[jboss-user] [JBoss Seam] - ASync calls stays in JBoss queue after restart

m_hess do-not-reply at jboss.com
Wed Dec 20 15:24:31 EST 2006


Hi,



What I basically have, is just a test bean, with an ASynchronous method:


  | @Local
  | public interface AsyncTest {
  | 
  | 	@Asynchronous
  | 	public void runAsync(@Expiration Date firstCall, @IntervalDuration long interval);
  | 
  | }
  | 

This works fine so far. Meaning I can set a firstCall date, and an milisecond interval, so that runAsync() is called e.g. every five seconds after a initial 1 minute delay.

Problem is, that this "Timer" (or whatever is created in the background) stays there for good. If I shut down JBoss and restart it, somewhere in the startup this timer-api seems to kick in again, and I get messages like this:


  | 21:10:45,223 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
  | 

And after my applications ear has been deployed, it changes to 

  | 21:18:05,032 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: asyncTest
  | 

But note(!): A new "timer" is also created by the fresh startup, so my log also shows the test debug message I put in the implementation of runAsync(). So this gets worse with every startup that also deploys my application. So far the only way I found to get rid of this, is to delete the JBoss internal Hypersonic database in 

jboss-4.0.5.GA/server/default/data/hypersonic

but I believe that there must be a better way to deal with this.

I think my issue is related to the "persistent" Timers that JBoss provides, so I guess the Jboss AS forum is the place to look for help. But maybe I can fix this with some simple line in the "@Destroy/@Remove" methods?

Thanks for insights any of you can give.

bye, Michael

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995442



More information about the jboss-user mailing list