| Summary: | JbpmContext.setRollbackOnly() in Job execution leads to "JbpmException: cannot mark externally managed transaction for rollback" with JCA inflow message service | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 4 | Reporter: | Toshiya Kobayashi <tkobayas> | ||||
| Component: | JBPM - within SOA | Assignee: | Kevin Conner <kevin.conner> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.3 CP02 | CC: | dlesage | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.3 CP04 ER1 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://jira.jboss.org/jira/browse/SOA-1881 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-03-24 09:48:40 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Deadline: | 2010-03-08 | ||||||
| Attachments: |
|
||||||
|
Description
Toshiya Kobayashi
2010-01-26 01:01:10 UTC
I've attatched a reproducer. - unzip jobexecution-rollback.zip - modify build.properties - ant deploypar - ant deploy - ant ejbclient (or access jbpm-console to start process instance) Attachment: Added: jobexecution-rollback.zip Link: Added: This issue is related to SOA-1882 Link: Added: This issue incorporates JBESB-3151 This exception is thrown by the jBPM codebase but we can work around it in our message listener. added 5.0.0.ER7 as affects version Link: Added: This issue related SOA-1886 Removing 5.0.0 ER7, see linked issue With SOA-1880/JBPM-2691, calling jbpmContext.setRollbackOnly() will no longer be necessary as a workaround to get the transaction rolled back, throwing any exception will be enough. Throwing JbpmException: cannot mark externally managed transaction for rollback" is meant to let the caller know that jBPM cannot reliably pass the rollback request to a transaction it did not start itself. If the caller (in this case the ESB) is able to invoke jbpmContext.isRollbackOnly() and honor the rollback request, I could turn this exception into a warning log. We are now catching (and ignoring) all JbpmExceptions if the jBPM transaction service has it marked as rollback. A better solution, from the perspective of jBPM, would be to handle this in JtaDbPersistenceService and invoke setRollbackOnly() on the encompassing transaction. Approved for SOA 4.3 CP03. Please make sure it gets assigned to the appropriate person. Link: Removed: This issue incorporates JBESB-3151 Link: Added: This issue depends JBESB-3151 Updated in ESB branch, will be in next merge. Draft text for Resolved Issues section of Release Notes states: https://jira.jboss.org/jira/browse/JBESB-3151 An org.jbpm.JbpmException: cannot mark externally managed transaction for rollback exception would occur if one called jbpmContext.setRollbackOnly() in the action handler whilst executing an async node via the Enterprise Service Bus' JCA Inflow Message Service. This exception was intended to let the caller know that jBPM cannot reliably pass the rollback request to a transaction it did not start itself. The software has been changed so that rather having it catch and ignore the JbpmExceptions that the transaction service has marked for rollback, they are instead handled by JtaDbPersistenceService. As a result of this change, setRollbackOnly() is now set only on the encompassing transaction. Hence, users are no longer faced with this exception. Verified in 4.3.CP03 ER1 |