The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20130604

[SOLVED] ejb3 jboss 7 postconstruct annotation not called/working

we had a weird problem where a @PostConstruct (javax.annotation.PostConstruct) annotation wasn't getting called in one of our ejbs.

we found out that the problem was some old ejb2 lifecycle methods needed to be removed from the java class:
public void ejbRemove() {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbCreate() {}


when we built the project again and restarted jboss, then @PostConstruct worked :)

No comments:

Post a Comment