This content has been marked as final.
Show 2 replies
-
1. Re: PostConstruct is not invoked with jboss4.0.4CR2
goeh May 31, 2006 10:00 AM (in response to jvramana)I'm experiencing the same problem now when I upgraded from 4.0.4.RC1 to 4.0.4.GA
@PostConstruct on my @Stateless session beans are not invoked.
I inject the SLSB in a MDB using @EJB, and on another place I manually look up the SLSB from a Servlet. Non of the use-cases invoke the @PostConstruct annotated method in the SLSB. -
2. Re: PostConstruct is not invoked with jboss4.0.4CR2 - SOLVED
goeh May 31, 2006 10:38 AM (in response to jvramana)My fault!
The code was linked with the old jboss-ejb3x.jar from 4.0.4.RC1.
In that version the @PostConstruct package name was javax.ejb.
4.0.4.CR2/GA follows the spec and has moved @PostConstruct to javax.annotation.
http://jira.jboss.com/jira/browse/EJBTHREE-448
So make sure you remove all references to old ejb3 jars and use the ones that come with jboss-4.0.4.GA. This makes life easier for you.
/Goran