InterceptorInstances instances = (InterceptorInstances) context.getContextData().get(InterceptorInstances.class);
if (instances == null) {
creationalContext = beanManager.createCreationalContext(bean);
interceptorInstances = new HashMap<String, SerializableContextualInstance<Interceptor<Object>, Object>>();
InterceptorBindings interceptorBindings = getInterceptorBindings(this.ejbName);
if (interceptorBindings != null) {
for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) {
addInterceptorInstance((Interceptor<Object>) interceptor, beanManager, interceptorInstances);
}
}
instances = new InterceptorInstances(creationalContext, interceptorInstances);
context.getContextData().put(InterceptorInstances.class, instances);