private void registerInterceptors(AbstractComponentDescription componentDescription, AnnotationInstance annotation) {
// Register our listeners on SFSB that will be created
if (componentDescription instanceof StatefulComponentDescription && isExtendedPersistenceContext(annotation)) {
componentDescription.addPostConstructInterceptorFactory(new SFSBCreateInterceptorFactory());
componentDescription.addPreDestroyInterceptorFactory(new SFSBDestroyInterceptorFactory());
componentDescription.addInterceptorFactory(SFSBInvocationInterceptorFactory.getInstance());
}
// register interceptor on stateful/stateless SB with transactional entity manager.
if (!isExtendedPersistenceContext(annotation) &&