final AtomicReference<ManagedReference> reference = (AtomicReference<ManagedReference>) context.getContextData().get(SerializedCdiInterceptorsKey.class);
if (reference == 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);
}
}
WeldInterceptorInstances instances = new WeldInterceptorInstances(creationalContext, interceptorInstances);
context.getContextData().put(SerializedCdiInterceptorsKey.class, new AtomicReference<ManagedReference>(new ValueManagedReference(new ImmediateValue<Object>(instances))));