EjbSchedulerService does not delete executed timer from DB
----------------------------------------------------------
Key: JBPM-1092
URL:
http://jira.jboss.com/jira/browse/JBPM-1092
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Reporter: Britt Miner
Assigned To: Tom Baeyens
When using the EjbSchedulerService, I've been having a problem with non-repeating
timers not being removed from the database after they are executed.
Of course, they won't be executed again because there is no longer an EJB timer to
call them; however, if the EjbSchedulerService is ever replaced on the same installation
with a DbSchedulerService, then all of these timers would likely be re-executed.
I was unable to find any code in the implementation that should have deleted a
non-repeating timer from the database after execution, so I modified
org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand to take advantage of the boolean already
being returned from Timer.execute():
//original line
//timer.execute(jbpmContext);
// BRITT-- if we're done with this timer, let's get rid of it...
boolean deleteJob = timer.execute(jbpmContext);
if(deleteJob) {
jbpmContext.getJobSession().deleteJob(timer);
}
// --BRITT
Note:
While I doubt that it has any effect on this issue, I'll note that to get the
EjbSchedulerService working in the first place, I implemented the EJB reference changes
proposed here
http://jira.jboss.com/jira/browse/JBPM-836.
-Britt
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira