Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [EJB 3.0] - @Predestroy In Stateless Session Bean

scott.stark@jboss.org

2007-06-14


hi all,
i have one stateless session bean and into this bean i have one destroy method :

|   @PreDestroy
|   public void destroy() {
|      try {
|         sender.disconnect(); // This is my Fuction fot some busness logic
|         com.magti.common.srvprov.Constants.printErrorComment("tibrv disconnecting ... ");
|      } catch (Exception e) {
|         com.magti.common.srvprov.Constants.printErrorComment("error in disconnect");
|      }
|   }
|
but when i tried to redeploy my project this method is not called automatically, is there any mistake ????
also i tried to @Preremove annotation but problem is not resolved.

i need method which is automatically called by container before redeployment.


Regards,
Paata.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054217#4054217

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054217
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.