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

grdzeli_kaci do-not-reply at jboss.com
Thu Jun 14 03:45:23 EDT 2007


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



More information about the jboss-user mailing list