Author: swd847
Date: 2010-07-23 08:43:13 -0400 (Fri, 23 Jul 2010)
New Revision: 13491
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/util/Work.java
Log:
JBSEAM-4677
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/util/Work.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/util/Work.java 2010-07-23 12:38:47
UTC (rev 13490)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/util/Work.java 2010-07-23 12:43:13
UTC (rev 13491)
@@ -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;
}
Show replies by thread