[jboss-user] [jBPM Users] - JBPM process timers in Multi Server deployment -3.2.6
do-not-reply at jboss.com
Mon Oct 26 05:16:42 EDT 2009
Excuse me for the post, but have done enough searches and dont find info regarding this. Help needed!!
I am hitting some issues related to using EJB Timer service for deployment, i have used Out of the box config recommended for enterprise deployment.
First the details of Deployment
1. 3 jboss 5.1.0 servers hitting the same database
2. Using JBPM 3.2.6SP1
3. Oracle is database.
4. Using Database persisted timers(ejb2 timers), in the same database table TIMERS on all servers, below is the jbpm.cfg.xml
| <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />
| <service name="message" factory="org.jbpm.msg.jms.JmsMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| <!-- <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />-->
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| <!-- use the context class loader
| <string name="jbpm.classLoader" value="context" />-->
| Note, that the default job executor needs to be overwritten with a null value.
| In the enterprise configuration there should be no job executor.
| Async messaging is there bound to jms and scheduling to ejb timers.
| <null name="jbpm.job.executor" />
EJB timer configuration is standard with database persistence JNDI name changed to Oracle database.
1. I see no issues with async continuations(have 2-3 such async exclusive nodes in my process definition)
2. But for timers,
a) Every once in a while these errors show up in server console,I see that this stack is present in more than one servers (which shows the timer fired on more than one server).
b) On server startup StaleObject Exception related to timer save are seen in plenty.Note only one server is started and stopped at a time.
I definitely feel that something is wrong with the way it is deployed, as when i looked into EJBTimerService code and i see that on server startup all timers persisted are deleted and reinserted. At this point if some other server already had a timer assigned(it is a thread based implementation), that timer would continue to run and another one would be started on server just restarted as well. And when time comes to fire, both servers would fire the timer. This would result in staleobject exception and hence certainly cause a problem.
Sorry if my post was not clear, as i have avoided lot of details so that the post is readable. I can provide more info as required. But please recommend if something can be done for this. Also it can be treated as more of a problem with EJBTimerService, but again i am looking at ways in which i can make JBPM timers work in multi server environment. I can not use local database hsql, as that is not allowed in production enviroment.
Worst case i am thinking of implementing a SingleServerPersistencePlugin for timers, and add an additional column with the server owner name, so that restoreTimers is clearly separated from all other servers. There is a definite problem with failover in such implementation but better get something working then nothing.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262109#4262109
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262109
More information about the jboss-user