[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2970) In POJO mode, seam 2.0.2 performs a commit on the transaction even if the transaction si marked for rollback

Denis Forveille (JIRA) jira-events at lists.jboss.org
Thu May 8 11:45:10 EDT 2008


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!
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

        



More information about the seam-issues mailing list