• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to Cancel EJB timers  RSS feed

mila Se
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Currently I am using Jboss 5.0.1 server and using EJB3 in my application. I have created the timers. I m calling the timers from the servlet (init method) during the server start up. And i have calling the cancelling the method from the destroy method. But while stopping the server i munable to cancel the server. I am getting the below exception. My application name is loa. It seems the destroy method of the servlet is getting called after all the EJBs are undeployed.

2010-11-29 22:27:20,642 [INFO ] -> com.covad.loa.ejb.bean.mdb.ResponseProcessorMDB [ - ] : @PreDestroy callback is invoked
2010-11-29 22:27:38,484 [ERROR] -> com.covad.loa.util.ServiceLocator [ - ] : Error in getLogFilePurgerTimer
javax.naming.NameNotFoundException: loa not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.covad.loa.util.ServiceLocator.getLogFilePurgerTimer(ServiceLocator.java:479)...more

2010-11-29 22:27:38,486 [ERROR] -> com.covad.loa.util.TimerUtility [ - ] : Error while cancelling timer service
at com.covad.loa.util.TimerUtility.cancelTimers(TimerUtility.java:39)
at com.covad.loa.web.loaDebugTool.util.servlet.UtilServlet.destroy(UtilServlet.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:275)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:274)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)

Could you please help me out for resolving this issue?
Also note that i tried using contextDestroyed() method of the ServletContextListener.

Thanks in adavnce!

mila Se
Posts: 2
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!