-
1. Re: EJB Timer Service issue - Executes multiple times
kanag_k Mar 5, 2009 11:09 AM (in response to kanag_k)Also this is what get printed in the logs continuously
2009-03-05 10:29:16,162 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846001,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-66901297,periode=60000,in_timeout]
2009-03-05 10:29:16,162 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846004,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3563093,periode=60000,active]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846004,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3503093,periode=60000,in_timeout]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846003,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-68412437,periode=60000,active]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846003,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-68352437,periode=60000,in_timeout]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846005,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-66961297,periode=60000,active]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,177 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846005,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-66901297,periode=60000,in_timeout]
2009-03-05 10:29:16,177 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846008,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3563094,periode=60000,active]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846008,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3503094,periode=60000,in_timeout]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846006,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3563094,periode=60000,active]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846006,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-3503094,periode=60000,in_timeout]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] run: [id=1236266846007,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-67889719,periode=60000,active]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: in_timeout
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 INFO [STDOUT] * Received Timer event: Probe Health Check Timer
2009-03-05 10:29:16,193 INFO [STDOUT] ---------------------
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=1236266846007,target=[target=jboss.j2ee:service=EJB3,ear=InventoryServices.ear,jar=InventoryOperationsEJB.jar,name=HealthCheckTimerBean],remaining=-67829719,periode=60000,in_timeout]
2009-03-05 10:29:16,193 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: active -
2. Re: EJB Timer Service issue - Executes multiple times
jaikiran Mar 6, 2009 1:05 AM (in response to kanag_k)the timer is created but the timeout method is executed multiple times. It waits for the specified duration(1 min) and again executes multiple times. is there any specific reason.
That's because, you configured the timer to do so :)ctx.getTimerService().createTimer(interval,interval, "Probe Health Check Timer");
Have a look at the javadocs of createTimer, the second parameter mentions the repeat interval. I think you want this, instead:ctx.getTimerService().createTimer(interval, "Probe Health Check Timer");