[jboss-user] [EJB 3.0] - Re: @PreDestroy not working..?
plexiq
do-not-reply at jboss.com
Sat Oct 14 16:15:07 EDT 2006
Mhm, spent some more hours on this problem.
Im now using very very basic SLSB's, and i still cant get @PreDestroy working. Any hints?
| package ...;
|
| ..
| import javax.ejb.Stateless;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| ...
| import javax.annotation.PostConstruct;
| import javax.annotation.PreDestroy;
|
| @Stateless
| public class RankingBean implements Ranking {
|
| @PersistenceContext(unitName="...")
| protected EntityManager em;
|
| public void keke(){}
|
| @PostConstruct
| public void thisOneWorksFine() {
| System.err.println("PostConstruct.");
|
| }
|
| @PreDestroy
| public void thisOneNeverGetsCalled() {
| System.err.println("PreDestroy.");
| }
| }
|
and
| package ...;
|
| import javax.ejb.Local;
|
| ...
|
| @Local
| public interface Ranking {
|
| public void keke();
|
| }
|
I wasted lots(!) of time on this, and i'm really clueless what might be the reason for the problem. I'd appreciate any help a lot ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978357#3978357
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978357
More information about the jboss-user
mailing list