Seam and JBPM timers
dahm May 29, 2008 4:45 PMHi,
we are using JBPM in our application and there is a timer-related state:
<state name="WaitingForReversal"> <event type="node-enter"> <action name="sendAnswerMessage" expression="#{jbpmPaymentProcessor.sendAnswerMessage}"></action> </event> <timer duedate="60 seconds" name="waitingForReversalTimer" transition="bookingCompleted"></timer> <transition to="isReversalRequestValid" name="reversalRequest"></transition> <transition to="BookingSuccessfullyCompleted" name="bookingCompleted"></transition> </state>
However, the transition does not fire automatically.
The JBPM job executor/scheduler needs to started.
What is the recommended way to do this with Seam? Can
you use Seam/EJB timers and configure it somewhere in components.xml or jbpm.cfg.xml?
I found some other posts about this topic, but none seemed to have a definite answer.
What we are currently doing is to add the Job Executor Servlet to our web.xml:
<servlet> <servlet-name>JobExecutorServlet</servlet-name> <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>JobExecutorServlet</servlet-name> <url-pattern>/jobs</url-pattern> </servlet-mapping>
This works, but produces the following log output:
6:29:41,921 JbpmJobExector:192.168.10.212:1 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.job.Timer - this operation breaks == 16:29:42,000 JbpmJobExector:192.168.10.212:1 ERROR [JobSession] org.hibernate.TransactionException: could not register synchronization 16:29:42,218 JbpmJobExector:192.168.10.212:1 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.job.Timer - this operation breaks == 16:29:42,234 JbpmJobExector:192.168.10.212:1 ERROR [JobSession] org.hibernate.TransactionException: could not register synchronization
I guess that it wants to synchronize itself with EJB transaction manager...? So what is the best solution in your opinion?
Thanks in advance
Markus