[jboss-cvs] jboss-seam/src/main/org/jboss/seam/jsf ...
Gavin King
gavin.king at jboss.com
Sat Jun 23 03:38:07 EDT 2007
User: gavin
Date: 07/06/23 03:38:07
Modified: src/main/org/jboss/seam/jsf SeamPhaseListener.java
Log:
smt with ht or et requires conversation context
Revision Changes Path
1.110 +6 -7 jboss-seam/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamPhaseListener.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/jsf/SeamPhaseListener.java,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- SeamPhaseListener.java 22 Jun 2007 15:28:56 -0000 1.109
+++ SeamPhaseListener.java 23 Jun 2007 07:38:07 -0000 1.110
@@ -141,7 +141,6 @@
beforeRestoreView( event.getFacesContext() );
}
- //delegate tx management to subclass:
handleTransactionsBeforePhase(event);
if ( event.getPhaseId() == RENDER_RESPONSE )
@@ -226,7 +225,6 @@
//can add messages
FacesMessages.afterPhase();
- //delegate tx management to subclass:
handleTransactionsAfterPhase(event);
if ( event.getPhaseId() == RENDER_RESPONSE )
@@ -302,8 +300,9 @@
if ( Init.instance().isTransactionManagementEnabled() )
{
PhaseId phaseId = event.getPhaseId();
- boolean beginTran = phaseId==PhaseId.RESTORE_VIEW || phaseId==PhaseId.RENDER_RESPONSE;
- //( phaseId==PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
+ boolean beginTran = phaseId == PhaseId.RENDER_RESPONSE ||
+ phaseId == ( Transaction.instance().isConversationContextRequired() ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.RESTORE_VIEW );
+ //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
if (beginTran)
{
@@ -317,11 +316,11 @@
if ( Init.instance().isTransactionManagementEnabled() )
{
PhaseId phaseId = event.getPhaseId();
- boolean commitTran = phaseId==PhaseId.INVOKE_APPLICATION ||
+ boolean commitTran = phaseId == PhaseId.INVOKE_APPLICATION ||
event.getFacesContext().getRenderResponse() || //TODO: no need to commit the tx if we failed to restore the view
event.getFacesContext().getResponseComplete() ||
- phaseId==PhaseId.RENDER_RESPONSE;
- //( phaseId==PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
+ phaseId == PhaseId.RENDER_RESPONSE;
+ //( phaseId == PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
if (commitTran)
{
More information about the jboss-cvs-commits
mailing list