]
Pete Muir updated JBSEAM-2970:
------------------------------
Fix Version/s: 2.0.2.GA
2.1.0.BETA1
In POJO mode, seam 2.0.2 performs a commit on the transaction even if
the transaction si marked for rollback
------------------------------------------------------------------------------------------------------------
Key: JBSEAM-2970
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2970
Project: Seam
Issue Type: Bug
Affects Versions: 2.0.2.CR2
Reporter: Denis Forveille
Fix For: 2.1.0.BETA1, 2.0.2.GA
The logic for performing the commit on a transaction should take into account that the
transaction is marked for rollback or not.
In Work.java, the could should be:
T result = work();
if (begin) {
if (Transaction.instance().isMarkedRollback()) {
log.debug("transaction isMarkedRollback. rolling back
transaction");
userTransaction.rollback();
} else {
log.debug("committing transaction");
userTransaction.commit();
}
}
return result;
In the current code, the call to userTransaction.commit() is attempted even if
Transaction.instance().isMarkedRollback() is true! This is the case if we call
Transaction.instance().setRollbackOnly() in a method annoted with @Transactional
See also the "TODO" marker in the code of this class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: