| Summary: | TaskException getting buried by a transaction rollback exception | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Jeffrey Bride <jbride2001> |
| Component: | jBPM 5 | Assignee: | Kris Verlaenen <kverlaen> |
| Status: | CLOSED WORKSFORME | QA Contact: | Lukáš Petrovický <lpetrovi> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | BRMS 5.3.0.GA | CC: | brms-jira |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-04-04 21:01:15 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Fixed in community, should be available in next build. verified this has been fixed. thanks kris. closing bug |
problem : TaskServiceSession.taskOperation() catches RuntimeException and if transactionType == local-JTA, sets the UserTransaction to Status.MARKED_ROLLBACK. However, in the finally block, a ut.commit() is currently ALWAYS invoked. Attempting to commit on a trnx marked for rollback is an illegal operation. Subsequently, the original RuntimException is overwritten by a new RuntimeException as follows (in a bitronix environment .... a similar runtime exception is thrown by arjuna in JBoss) : java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: transaction was marked as rollback only and has been rolled back solution : modify the finally block in TaskServiceSession.taskOperation() : 446 if (transactionStarted) { 447 try { 448 UserTransaction ut = (UserTransaction)new InitialContext().lookup( "java:comp/UserTransaction" ); 449 if(ut.getStatus() !=javax.transaction.Status.STATUS_MARKED_ROLLBACK) 450 ut.commit(); 451 } catch (Exception e) { 452 throw new RuntimeException(e); 453 } 454 }