1 Reply Latest reply on Sep 12, 2007 1:52 PM by pmuir

    @Asynchronous & @TransactionTimeout

    pdepaepe

      I wish to launch transaction that takes hours from a "Quartzed" Asynchronous method:

       @Asynchronous
       @Transactional
       @TransactionTimeout(1000000000)
       public QuartzTriggerHandle scheduleAsynchronousJob(@Expiration Date expiration, AsynchronousJob asynchronousJob)
       {



      But this return for long transactions:

      10:22:46,205 ERROR [JobRunShell] Job DEFAULT.-723041d8:114f8ca2bc8:-7fef threw an unhandled Exception:
      java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] [com.arjuna.ats.internal.jta.transaction.arjunacore.inactive] The transaction is not active!
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1466)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:163)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:126)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.rollback(ServerVMClientUserTransaction.java:148)
       at org.jboss.seam.transaction.UTTransaction.rollback(UTTransaction.java:66)
       at org.jboss.seam.util.Work.workInTransaction(Work.java:52)
       at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.async.AsynchronousInterceptor.aroundInvoke(AsynchronousInterceptor.java:42)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
       at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
       at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
       at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
       at org.jboss.seam.oxalya.carriocas.AsynchronousJobQuartz_$$_javassist_1.scheduleAsynchronousJob(AsynchronousJobQuartz_$$_javassist_1.java)
       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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
       at org.jboss.seam.async.AsynchronousInvocation.call(AsynchronousInvocation.java:52)
       at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
       at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
       at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:289)
       at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
       at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)


      Any idea to solve this? Thank you