Hide Forgot
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 }
Fixed in community, should be available in next build.
verified this has been fixed. thanks kris. closing bug