1 2 Previous Next 18 Replies Latest reply: Jan 27, 2013 8:03 AM by Luiz Gustavo RSS

TimerService: Timer interval stops after retry

Mario Klaver Newbie

Hello,

 

I posted this question already in another forum, but didn't get an answer. I don't know if this was because the question was asked on the wrong forum or it is just a diffult question. To find that out, I'm going to post it at least on the right forum (at least I hope ;-)  ).

 

We are running into a problem concerning the EJB 3.x timer service. We are noticing the timer doesn't fire timeouts anymore after an exception has occured and the retry of the current timeout isn't finished before the new timeout should occur.

 

We attached two source file, which will demonstrate the problem.

 

In short:

The execute method in the attached example gets called every minute. The first time it will throw an exception to enter the retry. When entering the retry it will sleep for 90 seconds to make sure it is not finished before the next timeout occurs.

 

After the retry finished, new timeouts will not occur. We would expect new timeouts after the retry finished, but this doesn't happen. Can anyone explain why?

 

We run the example on:

- JBoss 6.0

- with JRE 1.6.0_26

 

Below you will find the logging:

 

15:57:16,004 INFO  [timer.TimerTestBean] Executing TimerTestBean

15:57:16,004 INFO  [timer.TimerTestBean] Throwing exception: [pool-13-thread-1]

15:57:16,004 ERROR [org.jboss.ejb3.timerservice.mk2.task.TimerTask] Error invoking timeout for timer: [id=07edbaab-c7ee-4311-860b-0419a35a89d0 timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@21fd3544 initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 15:57:17 CET 2011 timerState=IN_TIMEOUT:javax.ejb.EJBException: java.lang.RuntimeException: Screw you

          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:183) [:0.0.1]

          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [:0.0.1]

          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]

          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]

          at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.singleton.aop.impl.AOPBasedInterceptorRegistry.intercept(AOPBasedInterceptorRegistry.java:110) [:1.0.0-alpha-28]

          at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:206) [:1.0.0-alpha-28]

          at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.callTimeout(AOPBasedSingletonContainer.java:886) [:1.0.0-alpha-28]

          at org.jboss.ejb3.timerservice.mk2.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:80) [:1.0.0-alpha-13]

          at org.jboss.ejb3.timerservice.mk2.task.TimerTask.run(TimerTask.java:127) [:1.0.0-alpha-13]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_26]

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_26]

          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_26]

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [:1.6.0_26]

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) [:1.6.0_26]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

          at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]

Caused by: java.lang.RuntimeException: Screw you

          at timer.TimerTestBean.execute(TimerTestBean.java:26) [:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.1.3]

          at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76) [:1.1.3]

          at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62) [:1.1.3]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

          at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:74) [:1.1.3]

          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_1180675534.invoke(InvocationContextInterceptor_z_fillMethod_1180675534.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]

          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1180675534.invoke(InvocationContextInterceptor_z_setup_1180675534.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.async.impl.interceptor.AsynchronousServerInterceptor.invoke(AsynchronousServerInterceptor.java:128) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.concurrency.aop.interceptor.ContainerManagedConcurrencyInterceptor.invoke(ContainerManagedConcurrencyInterceptor.java:181) [:1.0.0-alpha-4]

          at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) [:1.7.17]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]

          at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.17]

          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]

          ... 29 more

 

15:57:16,023 INFO  [org.jboss.ejb3.timerservice.mk2.task.TimerTask] Timer: [id=07edbaab-c7ee-4311-860b-0419a35a89d0 timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@21fd3544 initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 15:57:17 CET 2011 timerState=IN_TIMEOUT will be retried

15:57:16,023 INFO  [org.jboss.ejb3.timerservice.mk2.task.TimerTask] Retrying timeout for timer: [id=07edbaab-c7ee-4311-860b-0419a35a89d0 timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@21fd3544 initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 15:57:17 CET 2011 timerState=IN_TIMEOUT

15:57:16,024 INFO  [timer.TimerTestBean] Executing TimerTestBean

15:57:16,024 INFO  [timer.TimerTestBean] Sleeping 2 minutes: [pool-13-thread-1]

15:58:46,024 INFO  [timer.TimerTestBean] Finished executing TimerTestBean

  • 1. Re: TimerService: Timer interval stops after retry
    Mario Klaver Newbie

    We added some more logging. As you can see, the state of the timer is RETRY_TIMEOUT until the retry succeeds. After the TimerTestBean finishes the state is changed to ACTIVE. However, no new timeouts arrive, even though nextExpiration=Tue Dec 06 17:36:00.

     

    Our guess is that this is a bug in jboss 6.

     

    Thanks in advance,

     

    Regards,

    Mario

     

    17:35:00,024 INFO  [org.jboss.ejb3.timerservice.mk2.task.TimerTask] Timer: [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=IN_TIMEOUT will be retried

    17:35:00,024 INFO  [org.jboss.ejb3.timerservice.mk2.task.TimerTask] Retrying timeout for timer: [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=IN_TIMEOUT

    17:35:00,025 INFO  [timer.TimerTestBean] Executing TimerTestBean

    17:35:00,025 INFO  [timer.TimerTestBean] Sleeping 2 minutes: [pool-22-thread-1]

    17:35:30,002 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=RETRY_TIMEOUT

    17:36:00,002 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=RETRY_TIMEOUT

    17:36:30,003 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=RETRY_TIMEOUT

    17:36:30,025 INFO  [timer.TimerTestBean] Finished executing TimerTestBean

    17:37:00,003 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=ACTIVE

    17:37:30,003 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=ACTIVE

    17:38:00,004 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=ACTIVE

    17:38:30,002 INFO  [timer.PrintAllTimersBean] [id=f11091eb-67b7-4200-ba96-dc60d2c8751e timedObjectId=jboss.j2ee:jar=timerTest.jar,name=TimerTestBean,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7b4b5f0c initialExpiration=Tue Dec 06 00:00:00 CET 2011 intervalDuration(in milli sec)=0 nextExpiration=Tue Dec 06 17:36:00 CET 2011 timerState=ACTIVE

  • 2. Re: TimerService: Timer interval stops after retry
    Mario Klaver Newbie

    Nobody replied, so I guess I'm just going to raise it as an issue in JIRA and see what comes out of that.

     

    The problem is that we have batch jobs that run every minute. It's not an issue that it sometimes runs a little bit later. But it is a problem that it stops running in case of above situation.

     

    JIRA issue raised: https://issues.jboss.org/browse/JBAS-9457

     

    Regards,

    Mario

  • 4. Re: TimerService: Timer interval stops after retry
    Wolf-Dieter Fink Master

    A workaround for you might be

    1)

    add @Lock(READ) to your method to call it concurrently. You might handle in the bean whether it is called when in progress. Not 100% thread save but it should work.

    2)

    use BeanManaged concurrency and handle it in the bean

    3)

    use AS7 upstream with the fix

     

    regards

    Wolf

  • 5. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    Hi,

     

    1) and 2) didn't solve the problem.

     

     

    Regards

     

    Daniel

  • 6. Re: TimerService: Timer interval stops after retry
    Wolf-Dieter Fink Master

    Hi Daniel,

     

    if you use 1) or 2) you should not run in a 'retry' of the timeout and this should prevent this situation in AS6.

     

    Or do you use AS7? Then you should use AS7.1.0.CR1b here my fix of https://issues.jboss.org/browse/AS7-2995 is integrated.

  • 7. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    Yes Wolf-Dieter, i also tried 1) and 2) but suprisingly it doesn't help....

     

    I've tried all combinations

     

    a)

     

    @Singleton

    @LocalBean

    @Lock(LockType.READ)

    public class PingService {

     

        @Schedule(second="*/15", minute="*", hour="*", persistent=false)

        public void timeout() {

          ....

        }

    }

     

     

    b)

     

    @Singleton

    @LocalBean

    @Lock(LockType.READ)

    @TransactionManagement(TransactionManagementType.BEAN)

    public class PingService {

     

        @Schedule(second="*/15", minute="*", hour="*", persistent=false)

        public void timeout() {

          ....

        }

     

    }

     

     

    c)

     

    @Singleton

    @LocalBean

    @Lock(LockType.READ)

    @TransactionAttribute(TransactionAttributeType.NEVER)

    public class PingService {

     

        @Schedule(second="*/15", minute="*", hour="*", persistent=false)

        @TransactionAttribute(TransactionAttributeType.NEVER)

        public void timeout() {

          ....

        }

    }

     

     

    Each of them throws this exception:

     

    2012-02-08 18:11:28,136 ERROR [org.jboss.ejb3.timerservice.mk2.task.TimerTask] (pool-11-thread-1) Error invoking timeout for timer: [id=e83de39a-4e1d-4917-9f34-1e30e68efaae timedObjectId=jboss.j2ee:ear=CSDatabase.ear,jar=CSDatabaseEJB.jar,name=PingService,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@7a557120 initialExpiration=Wed Feb 08 00:00:00 CET 2012 intervalDuration(in milli sec)=0 nextExpiration=Wed Feb 08 18:04:24 CET 2012 timerState=IN_TIMEOUT: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

     

    This is indeed curious... especially b) and c) ....

     

     

    Regards

     

    Daniel

  • 8. Re: TimerService: Timer interval stops after retry
    Wolf-Dieter Fink Master

    2) means the annotation @ConcurrencyManagement(BEAN) instead of Lock

     

    Also do you use AS6 or AS7.1? I've test it with AS7.1.

  • 9. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    Ok, i forget to mention @ConcurrencyManagement(BEAN), but i also tried this one with and without synchronized-blocks, so the cause of it shouldn't be a a dead-lock.

    Doesn't help.....

     

    I'm working with 6.1 .

    Migration to 7 isn't an issue now (due to the new module structure.....too much effort now).

     

     

    Regards

     

    Daniel

  • 10. Re: TimerService: Timer interval stops after retry
    Wolf-Dieter Fink Master

    As menitoned here https://issues.jboss.org/browse/JBAS-9457 you will have no chance to get it patched.

     

    But what I suppose is that you dont have the issue that the timer will not continue, right?

    Do you see any failure in your business code? Or is this code complete correct and the problem occour after leaving the method?

    Could you attach the relevant part of logfile?

  • 11. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    Yes you're right: the timer is still running after that exception for an undefined time and then silently stops (without further messages).

    And i think there's a chance to figure out the conditions for this problem :-)

     

    I'll setup my project now with multiple timers and all possible meaningful combinations of annotations.

    More logs tomorrow....  :-)

     

     

    Regards

     

    Daniel

     

     

     

    P.S.:

     

    There are also some mismatches in the exception i don't understand:

     

    Exception is thrown at:  2012-02-08 18:11:28,136


    initialExpiration=Wed Feb 08 00:00:00 CET 2012   <-- AS was started at 18:00

    intervalDuration(in milli sec)=0  <-- Interval is set to 1000ms

    nextExpiration=Wed Feb 08 18:04:24 CET 2012   <-- Exception at 18:11:28...next expiration in the past, or what does this mean?

  • 12. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    An actual and complete stacktrace:

     

     

    2012-02-09 17:43:27,428 ERROR [org.jboss.ejb3.timerservice.mk2.task.TimerTask] (pool-14-thread-2) Error invoking timeout for timer: [id=89162cae-d1ab-4d6d-b519-b8146d33fd55 timedObjectId=jboss.j2ee:ear=CSDatabase.ear,jar=CSDatabaseEJB.jar,name=PingService,service=EJB3 auto-timer?:true persistent?:false timerService=org.jboss.ejb3.timerservice.mk2.TimerServiceImpl@70f4a1d3 initialExpiration=Thu Feb 09 00:00:00 CET 2012 intervalDuration(in milli sec)=0 nextExpiration=Thu Feb 09 17:36:30 CET 2012 timerState=IN_TIMEOUT: javax.ejb.EJBTransactionRolledbackException: Transaction rolled back

            at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleEndTransactionException(CMTTxInterceptor.java:115) [:0.0.2]

            at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:87) [:0.0.2]

            at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:255) [:0.0.2]

            at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.2]

            at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.2]

            at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.2]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.21]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.21]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.21]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.21]

            at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]

            at org.jboss.ejb3.singleton.aop.impl.AOPBasedInterceptorRegistry.intercept(AOPBasedInterceptorRegistry.java:111) [:1.0.2]

            at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:206) [:1.0.2]

            at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.callTimeout(AOPBasedSingletonContainer.java:888) [:1.0.2]

            at org.jboss.ejb3.timerservice.mk2.task.CalendarTimerTask.callTimeout(CalendarTimerTask.java:80) [:1.0.0-alpha-13]

            at org.jboss.ejb3.timerservice.mk2.task.TimerTask.run(TimerTask.java:127) [:1.0.0-alpha-13]

            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [:1.6.0_22]

            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [:1.6.0_22]

            at java.util.concurrent.FutureTask.run(FutureTask.java:166) [:1.6.0_22]

            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) [:1.6.0_22]

            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) [:1.6.0_22]

  • 14. Re: TimerService: Timer interval stops after retry
    Dee Kay Newbie

    Thanks for your support Wolf-Dieter!

     

    https://issues.jboss.org/browse/AS7-3119 is my favourite :-)

     

    The others are related to persistent timers (3274, 3028) or do not match in my case (2995, the logic is completely encapsulated in a try-catch-block).

    Perhaps.....for  3119 the solution could be easy. I'll try a Standalone-Thread that is triggered by the timer...

     

    And AS6 is still my favourite. AS6 does really a good job for my application: stable and fast (5000 parallel JSF-sessions, 500 fat-clients connected via JMS doing concurrently imports and exports via JPA. On a SINGLE-node! ).

    The timer is the only problem.....

     

    Regards

     

    Daniel

1 2 Previous Next