[jboss-user] [jBPM] - jBPM 4.3 - job is not released when the transaction is marked as rollback only

Adam Laczynski do-not-reply at jboss.com
Thu Jun 10 05:25:07 EDT 2010


Adam Laczynski [http://community.jboss.org/people/adam.laczynski] created the discussion

"jBPM 4.3 - job is not released when the transaction is marked as rollback only"

To view the discussion, visit: http://community.jboss.org/message/547310#547310

--------------------------------------------------------------
Job is not released when the exception occurred during job execution and transaction is marked as rollback only because synchronization cannot be registered in transaction (according to javax.transaction.Transaction#registerSynchronization java doc:  @exception RollbackException Thrown to indicate that the transaction has been marked for rollback only).
Following exception is thrown:
org.jbpm.api.JbpmException: couldn't register synchronization: test1
    at org.jbpm.pvm.internal.tx.JtaTransaction.registerSynchronization(JtaTransaction.java:78)
    at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.handleJobExecutionException(ExecuteJobCmd.java:111)
    at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:92)
    at org.jbpm.pvm.internal.cmd.ExecuteJobCmd.execute(ExecuteJobCmd.java:42)
    at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
    at org.jbpm.pvm.internal.tx.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:87)
    at org.jbpm.pvm.internal.tx.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:66)
    at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
    at org.jbpm.pvm.internal.tx.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
    at org.jbpm.pvm.internal.tx.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
    at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
    at org.jbpm.pvm.internal.jobexecutor.JobParcel.run(JobParcel.java:48)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

After that, job could be acquired again but only after the lockMillis (default 30 minutes).
IMO in such case the job has to be released because it delay job execution. To achieve it JobExceptionHandler (with small modification) has to be register before invoking job.execute(...) in org.jbpm.pvm.internal.cmd.ExecuteJobCmd:76. Exception could be passed to the handler in the catch block.

Environment where the problem occurs:
- WebLogic 10.2.3
- jbpm 4.3
- Oracle 10g

Does anybody have similar problem? Is it known issue?

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/547310#547310]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100610/ae498f17/attachment.html 


More information about the jboss-user mailing list