-
Aug 27th, 2010, 11:04 AM
#1
SpringBeanAutowiringInterceptor disables SFSB lifecycle callbacks
I'm working with a stateful session bean deployed in JBoss 4.3 EAP and notices that when I attach a SpringBeanAutowiringInterceptor (via the ejb-jar.xml) it prevents methods on the bean that are annotated with @PostConstruct, @PrePassivate, @PostActivate and @PreDestroy from being called. If I remove the interceptor, these methods get called. From the JBoss log (at TRACE level) you can see that SpringBeanAutowiringInterceptor has its own annotated lifecycle methods that are getting registered in place of the ones on my bean.
This post is just FYI. It took a few hours to figure out this feature and I thought it may save others some time to post it here. My workaround was to not use SpringBeanAutowiringInterceptor on this particular bean, using the <exclude-default-interceptors> tag.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules