Bug 779503 (SOA-1886) - JbpmContext.setRollbackOnly() in Job execution leads to "JbpmException: cannot mark externally managed transaction for rollback" with JCA inflow message service
Summary: JbpmContext.setRollbackOnly() in Job execution leads to "JbpmException: canno...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1886
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBPM - within SOA
Version: 5.0.0 ER7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.0.0 GA,5.0.0 ER8
Assignee: Kevin Conner
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-26 16:12 UTC by Toshiya Kobayashi
Modified: 2010-02-10 15:13 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-10 15:13:15 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 779498 0 high CLOSED JbpmContext.setRollbackOnly() in Job execution leads to "JbpmException: cannot mark externally managed transaction for r... 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-1886 0 Major Closed JbpmContext.setRollbackOnly() in Job execution leads to "JbpmException: cannot mark externally managed transaction for r... 2014-05-05 15:17:31 UTC

Internal Links: 779498

Description Toshiya Kobayashi 2010-01-26 16:12:10 UTC
Affects: Release Notes
Date of First Response: 2010-01-27 05:13:22
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/379428
project_key: SOA

In case that Job execution of an async node is processed by ESB's JCA inflow message service, if you call jbpmContext.setRollbackOnly() in the action handler, the Exception below will be thrown:

19:11:51,045 ERROR [JmsServerSession] Unexpected error delivering message delegator->JBossMessage[5177979334393866]:PERSISTENT, deliveryId=1
org.jbpm.JbpmException: cannot mark externally managed transaction for rollback
at org.jbpm.persistence.db.DbPersistenceService.endTransaction(DbPersistenceService.java:129)
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:201)
at org.jbpm.svc.Services.close(Services.java:247)
at org.jbpm.JbpmContext.close(JbpmContext.java:131)
at org.jboss.soa.esb.services.jbpm.integration.command.AbstractMessageListener.onMessage(AbstractMessageListener.java:80)
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:597)
at org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter$1.invoke(JCAInflowAdapter.java:276)
at org.jboss.soa.esb.listeners.jca.EndpointProxy.delivery(EndpointProxy.java:242)
at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:145)
at $Proxy92.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect16.invoke(SessionAspect16.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:213)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:619)

Actually, this causes rollback. But this looks messy on the console (stacktrace etc) so it's better to explicitly handle the rollback rather than forcing it as a side effect of invoking the jBPM context close().

Comment 1 Kevin Conner 2010-01-26 16:13:07 UTC
Link: Added: This issue is related to SOA-1881


Comment 2 Kevin Conner 2010-01-27 09:42:15 UTC
Link: Added: This issue depends JBESB-3158


Comment 3 Kevin Conner 2010-01-27 10:13:22 UTC
This is now masked in the ESB codebase.

Comment 4 Toshiya Kobayashi 2010-02-10 15:13:15 UTC
Verified


Note You need to log in before you can comment on or make changes to this bug.