[
http://jira.jboss.com/jira/browse/JBSEAM-2970?page=all ]
Denis Forveille updated JBSEAM-2970:
------------------------------------
Description:
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
was:
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!
See also the "TODO" marker in the code of this class
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
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:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira