[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-1926) EJBTimer Restart Issue : Dropped/Failed Timer Execution
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Tue Oct 13 08:17:05 EDT 2009
[ https://jira.jboss.org/jira/browse/EJBTHREE-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12489576#action_12489576 ]
jaikiran pai commented on EJBTHREE-1926:
----------------------------------------
Timers scheduled for future are correctly suspended during the undeployment of the corresponding EJB3 container. However when the server starts the container is deployed again it restores these timers a bit too early within the lockedStart() where the container is blocked to allow any invocations. As a result, any of the restored timers which are triggered will not be able to invoke on the container.
As a fix, the restoring of the timers has to be done in the containers after all the dependencies have been satisfied and the container has been completely started and open for invocations:
public void start() throws Exception
{
this.lockedStart();
// Allow invocations until stop()
this.allowInvocations();
// Now that invocations are allowed on the containers,
// let us invoke this callback so that individual
// containers can do an startup invocations if required
this.afterStart();
}
The afterStart() is where the individual containers (like the StatelessContainer) can restore the timers.
> EJBTimer Restart Issue : Dropped/Failed Timer Execution
> -------------------------------------------------------
>
> Key: EJBTHREE-1926
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-1926
> Project: EJB 3.0
> Issue Type: Bug
> Components: core
> Affects Versions: 1.1.15
> Environment: JBoss 5.1.0.GA
> Reporter: Kyle S. Bober
> Assignee: jaikiran pai
>
> Here is the situation: I launch a series of EJBTimers that are scheduled to run in the future. I shut down JBoss and restart the server. Upon Jboss restart I notice a good portion of the EJBTimer(s) which were scheduled to execute fail on JBoss restart. This is what I see in the log:
> 10:02:35,250 ERROR [TimerImpl] Error invoking ejbTimeout
> org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped.
> at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:6
> 2)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterce
> ptor.java:67)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:249)
> at org.jboss.as.ejb3.timerservice.TimedObjectInvokerBridge.callTimeout(TimedObjectInvokerBridge.jav
> a:44)
> at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
>
> Looking at the stacktrace it appears that the timer is triggered even before the EJB container is probably completely started. The unfortunate thing about this is that a good portion of the EJBTimer(s) that were schedule to execute are never executed and are removed from the Timers Table. Yet some of the EJBTimer(s) are successfully kicked of and executed properly.
> I will provided a sample application to reproduce this issue in the near future.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list