Author: norman.richards(a)jboss.com
Date: 2008-06-19 16:14:32 -0400 (Thu, 19 Jun 2008)
New Revision: 8395
Modified:
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
Log:
JBSEAM-3063
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-06-19 17:17:59 UTC (rev
8394)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-06-19 20:14:32 UTC (rev
8395)
@@ -596,22 +596,23 @@
}
void commitOrRollback(PhaseId phaseId)
- {
- try
- {
- if ( Transaction.instance().isActive() )
- {
- log.debug("committing transaction after phase: " + phaseId);
- Transaction.instance().commit();
- }
- else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
- {
+ {
+ try {
+ if (Transaction.instance().isActive()) {
+ try {
+ log.debug("committing transaction after phase: " + phaseId);
+ Transaction.instance().commit();
+
+ } catch (IllegalStateException e) {
+ log.warn("TX commit failed with illegal state exception. This may
be " +
+ "because the tx timed out and was rolled back in the
background.", e);
+ }
+ } else if ( Transaction.instance().isRolledBackOrMarkedRollback()) {
log.debug("rolling back transaction after phase: " + phaseId);
Transaction.instance().rollback();
}
- }
- catch (Exception e)
- {
+
+ } catch (Exception e) {
throw new IllegalStateException("Could not commit transaction", e);
}
}
Show replies by date