]
Toshiya Kobayashi updated JBPM-2964:
------------------------------------
Attachment: (was: JBPM-2964.patch)
Throw the exception on commit when both commit and rollback fail
----------------------------------------------------------------
Key: JBPM-2964
URL:
https://jira.jboss.org/browse/JBPM-2964
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.9
Reporter: Toshiya Kobayashi
Attachments: JBPM-2964.patch
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) {
rollback();
closeSession();
closeConnection();
throw new JbpmPersistenceException("transaction commit failed",
commitException);
}
}
It is not a desirable behaviour. It's better to catch the exception on rollback, log
it and throw the exception on commit.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: