After applying the patch it works perfectly. Both the @PostConstruct and the
@PreDestroy methods are executed.
Thanks a million, Jaikiran - you made my day!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265887#4265887
Reply to the post :
http://www.jboss.or
Looking at the EJB3 code, i do believe that this should be working. Can you
please apply the EJB3 plugin http://www.jboss.org/ejb3/ejb3plugin.html against
AS-5.1.0 and see if it works? If that too doesn't work, then please post the
entire service bean code and the relevant console logs.
The la
The same problem exists with @PreDestroy.
The bean is stopped by the container (at least the log message [EJBContainer]
STOPPED EJB: is present) but the @PreDestroy method is not invoked. The
signature is @PreDestroy public void shutdown().
View the original post :
http://www.jboss.org/i
When I put this in my @Service bean:
| @PostConstruct
| public void init() {
| System.out.println("### init()");
| }
|
I don't see the output in the log and I can definitely tell the bean is working.
Just to be sure, that's a @javax.annotation.PostConstr
It does support @PostConstruct. Did you try adding it to a method (with the
correct signature) in that @Service?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265477#4265477
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply
Sorry, I got it wrong.
The timer service gets injected but I cannot set it up in the bean's
constructor because the injection only happens after the constructor was run.
What I'm missing is the lifecycle callbacks such as @PostConstruct.
So my actual question is:
Why are there no lifecycle callb