[seam-commits] Seam SVN: r8889 - trunk/src/main/org/jboss/seam/jsf.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Sep 3 14:25:32 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-09-03 14:25:32 -0400 (Wed, 03 Sep 2008)
New Revision: 8889
Modified:
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
Log:
JBSEAM-1747
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-09-03 17:38:23 UTC (rev 8888)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-09-03 18:25:32 UTC (rev 8889)
@@ -349,10 +349,10 @@
{
if ( Init.instance().isTransactionManagementEnabled() )
{
- commitOrRollback(PhaseId.INVOKE_APPLICATION);
+ commitOrRollback("after invoking page actions");
if ( !facesContext.getResponseComplete() )
{
- begin(PhaseId.INVOKE_APPLICATION);
+ begin("before continuing render");
}
}
}
@@ -578,14 +578,19 @@
{
return Contexts.getConversationContext().isSet("org.jboss.seam.handledException");
}
-
- void begin(PhaseId phaseId)
+
+ void begin(PhaseId phaseId)
{
+ begin("prior to phase: " + phaseId);
+ }
+
+ void begin(String phaseString)
+ {
try
{
if ( !Transaction.instance().isActiveOrMarkedRollback() )
{
- log.debug("beginning transaction prior to phase: " + phaseId);
+ log.debug("beginning transaction " + phaseString);
Transaction.instance().begin();
}
}
@@ -595,12 +600,17 @@
}
}
- void commitOrRollback(PhaseId phaseId)
+ void commitOrRollback(PhaseId phaseId)
+ {
+ commitOrRollback("after phase: " + phaseId);
+ }
+
+ void commitOrRollback(String phaseString)
{
try {
if (Transaction.instance().isActive()) {
try {
- log.debug("committing transaction after phase: " + phaseId);
+ log.debug("committing transaction " + phaseString);
Transaction.instance().commit();
} catch (IllegalStateException e) {
@@ -608,7 +618,7 @@
"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);
+ log.debug("rolling back transaction " + phaseString);
Transaction.instance().rollback();
}
More information about the seam-commits
mailing list