-
1. Re: @PreDestroy not working..?
plexiq Oct 13, 2006 4:59 AM (in response to delley)Im having a very similar problem with MD Pojo's:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=92593 -
2. Re: @PreDestroy not working..?
delley Oct 13, 2006 8:58 AM (in response to delley)tried to solve the issue by upgrading to jboss-EJB-3.0_RC9-FD.
Now I cant even deploy my MDB...getting following exception (sigh):
java.lang.RuntimeException: unable to determine messagingType interface for MDB
at org.jboss.ejb3.mdb.MDB.getMessagingType(MDB.java:88)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.resolveMessageListener(JBossMessage
EndpointFactory.java:241)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.j
ava:184)
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:185)
at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:151)
at org.jboss.ejb3.mdb.MDB.start(MDB.java:126) -
3. Re: @PreDestroy not working..?
plexiq Oct 14, 2006 4:15 PM (in response to delley)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."); } }
andpackage ...; 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 ;) -
4. Re: @PreDestroy not working..?
abuayyub Oct 16, 2006 10:43 AM (in response to delley)Add a method and annotate it with @Remove. See if the PreDestroy gets invoked before the ejb remove is called.
-
5. Re: @PreDestroy not working..?
plexiq Oct 17, 2006 2:22 AM (in response to delley)Method annotated with @Remove isnt called either.