]
Alejandro Guizar closed JBPM-1119.
----------------------------------
Closing issues that I resolved in already released versions.
Timers using EjbSchedulerService are not persisted across JBoss
restarts
------------------------------------------------------------------------
Key: JBPM-1119
URL:
https://jira.jboss.org/jira/browse/JBPM-1119
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.2.1
Environment: JBoss 4.0.5
Reporter: Aner Perez
Assignee: Alejandro Guizar
Fix For: jBPM 3.2.3
Timers created using the EjbSchedulerService do not fire if JBoss is restarted after the
timer is set. The reason
is that although the JBPM timer row still exists in the database, there is no
corresponding EJB timer to kick off
the JBPM timer action.
EJB timers are supposed to persist across server restarts but there is a catch. JBPM
uses an EJB with a "local"
interface to dispatch the JBPM timers. JBoss (as of 4.0.2) has decided to make the jndi
name of EJBs with
local interfaces have a unique name by appending an '@' sign and a hashcode to
the EJB name. This hash
code is different every time the server is restarted. When the EJB timers are reloaded
after a restart, the EJB
that is supposed to receive the timer doesn't exist anymore because it now has a
different name (different
hashcode). This causes the timers to be deactivated and they do not fire at the
appointed time.
See
http://wiki.jboss.org/wiki/Wiki.jsp?page=WhyDoesTheLocalNameContainARando... for
an explanation
of the EJB name issue for EJBs with a local interface.
We need a local-jndi-name parameter added to the TimerServiceBean so we can always locate
it under the same name
and the timers will work as expected.
adding the following to jboss.xml takes care of this issue:
<session>
<ejb-name>TimerServiceBean</ejb-name>
<local-jndi-name>TimerServiceBean</local-jndi-name>
</session>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: