[seam-commits] Seam SVN: r13933 - branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/util.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Nov 29 15:58:44 EST 2010
Author: manaRH
Date: 2010-11-29 15:58:44 -0500 (Mon, 29 Nov 2010)
New Revision: 13933
Modified:
branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/util/Work.java
Log:
JBSEAM-5469
Modified: branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/util/Work.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/util/Work.java 2010-11-29 20:52:34 UTC (rev 13932)
+++ branches/enterprise/JBPAPP_5_0/src/main/org/jboss/seam/util/Work.java 2010-11-29 20:58:44 UTC (rev 13933)
@@ -76,10 +76,18 @@
}
catch (Exception e)
{
- if (newTransactionRequired && userTransaction.getStatus() != Status.STATUS_NO_TRANSACTION && isRollbackRequired(e, true))
+ if (newTransactionRequired && userTransaction.getStatus() != Status.STATUS_NO_TRANSACTION )
{
- log.debug("rolling back transaction");
- userTransaction.rollback();
+ if(isRollbackRequired(e, true))
+ {
+ log.debug("rolling back transaction");
+ userTransaction.rollback();
+ }
+ else
+ {
+ log.debug("committing transaction after ApplicationException(rollback=false):" + e.getMessage());
+ userTransaction.commit();
+ }
}
throw e;
}
More information about the seam-commits
mailing list