-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: jBPM 3.2.9
-
Fix Version/s: jBPM 3.2.10
-
Component/s: Runtime Engine
-
Labels:None
In case that commit() throws an exception (e.g. StaleObjectStateException) in DbPersistenceService.endTransaction(), rollback() will be called. And then, if rollback() also throws an exception, a client application will get the latter exception (Usually, it would be java.lang.IllegalStateException: BaseTransaction.rollback - [com.arjuna.ats.internal.jta.transaction.arjunacore.notx] [com.arjuna.ats.internal.jta.transaction.arjunacore.notx] no transaction! ).
public void endTransaction() {
if (!isTransactionRollbackOnly()) {
Exception commitException = commit();
if (commitException != null)
}
It is not a desirable behaviour. It's better to catch the exception on rollback, log it and throw the exception on commit.