[jboss-user] [JBoss jBPM] - Timers get cancelled in TimerServiceBean.ejbTimeout even Run
justin.zhou
do-not-reply at jboss.com
Sat Jun 23 03:52:05 EDT 2007
Hi,
In a processdef, one fork leads to several states, each state has a timer attached. The idea is to do concurrent async executions through the TimerServiceBean. However, get exceptions, when those states changing to join node.
anonymous wrote : Caused by: org.jbpm.graph.def.DelegationException: Row was updated or deleted by another transaction (or u
| nsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#177]
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.jav
| a:173)
| at org.jbpm.graph.def.ProcessDefinition_$$_javassist_98.raiseException(ProcessDefinition_$$_javass
| ist_98.java)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.jav
| a:173)
| at org.jbpm.graph.node.State_$$_javassist_89.raiseException(State_$$_javassist_89.java)
| at org.jbpm.job.Timer.execute(Timer.java:66)
| at org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand.execute(ExecuteTimerCommand.java:23)
| at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
| ... 42 more
|
This is acceptable if things can rollback. However when this happens, timers still been cancelled, so the actions will never been retried and the process sitting dead:
anonymous wrote : 2007-06-23 02:05:15,627 996227 DEBUG [org.jbpm.svc.Services] (EJB-Timer-7[target=jboss.j2ee:jndiName=local
| /TimerServiceBean at 11364891,service=EJB]:) closing service 'persistence': org.jbpm.persistence.jta.JtaDbPer
| sistenceService at 698193
| 2007-06-23 02:05:15,627 996227 DEBUG [org.jbpm.persistence.db.DbPersistenceService] (EJB-Timer-7[target=jb
| oss.j2ee:jndiName=local/TimerServiceBean at 11364891,service=EJB]:) committing hibernate transaction
| 2007-06-23 02:05:15,628 996228 DEBUG [org.hibernate.transaction.CMTTransaction] (EJB-Timer-7[target=jboss.
| j2ee:jndiName=local/TimerServiceBean at 11364891,service=EJB]:) commit
| 2007-06-23 02:05:15,628 996228 DEBUG [org.jbpm.svc.Services] (EJB-Timer-7[target=jboss.j2ee:jndiName=local
| /TimerServiceBean at 11364891,service=EJB]:) closing service 'scheduler': org.jbpm.scheduler.ejbtimer.EjbSche
| dulerService at b9ec0e
| 2007-06-23 02:05:15,628 996228 DEBUG [org.jbpm.scheduler.ejbtimer.EjbSchedulerService] (EJB-Timer-7[target
| =jboss.j2ee:jndiName=local/TimerServiceBean at 11364891,service=EJB]:) removing the timer service session bea
| n
| 2007-06-23 02:05:15,631 996231 DEBUG [org.jbpm.svc.Services] (EJB-Timer-8[target=jboss.j2ee:jndiName=local
| /TimerServiceBean at 11364891,service=EJB]:) closing service 'tx': org.jbpm.tx.TxService at 38be48
| 2007-06-23 02:05:15,632 996232 ERROR [org.jboss.ejb.plugins.LogInterceptor] (EJB-Timer-8[target=jboss.j2ee
| :jndiName=local/TimerServiceBean at 11364891,service=EJB]:) TransactionRolledbackLocalException in method: pu
| blic abstract java.lang.Object org.jbpm.command.CommandService.execute(org.jbpm.command.Command), causedBy
| :
| org.jbpm.JbpmException: couldn't execute org.jbpm.scheduler.ejbtimer.ExecuteTimerCommand at 2d0914
| at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.j
| ava:237)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterce
| ptor.java:158)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterc
| eptor.java:169)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
|
Should Timer.cancel() rollback facing a RuntimeException in JTA transactions? I tried both JTA and CMP for hibernate, no luck. Did I miss something?
Justin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057100#4057100
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057100
More information about the jboss-user
mailing list