[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Fri Nov 3 20:00:14 EST 2006
User: gavin
Date: 06/11/03 20:00:14
Modified: src/main/org/jboss/seam/contexts
ClientConversationContext.java ContextAdaptor.java
Lifecycle.java
Log:
JBSEAM-460, reduce reliance on StateManager
Revision Changes Path
1.9 +5 -1 jboss-seam/src/main/org/jboss/seam/contexts/ClientConversationContext.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ClientConversationContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/ClientConversationContext.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ClientConversationContext.java 25 Oct 2006 15:14:35 -0000 1.8
+++ ClientConversationContext.java 4 Nov 2006 01:00:14 -0000 1.9
@@ -22,7 +22,7 @@
*
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class ClientConversationContext implements Context {
@@ -87,6 +87,10 @@
{
getAttributeMap().put( ScopeType.CONVERSATION.getPrefix(), map );
}
+ else
+ {
+ getAttributeMap().remove( ScopeType.CONVERSATION.getPrefix() );
+ }
}
private Map getAttributeMap()
1.2 +2 -2 jboss-seam/src/main/org/jboss/seam/contexts/ContextAdaptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ContextAdaptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/ContextAdaptor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ContextAdaptor.java 17 Jun 2006 04:51:02 -0000 1.1
+++ ContextAdaptor.java 4 Nov 2006 01:00:14 -0000 1.2
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public abstract class ContextAdaptor
{
@@ -37,7 +37,7 @@
public abstract void invalidate();
- public static ContextAdaptor getSession(ExternalContext externalContext, boolean create)
+ public static ContextAdaptor getSession(ExternalContext externalContext)
{
Object session = externalContext.getSession(true);
if (session instanceof HttpSession)
1.64 +4 -4 jboss-seam/src/main/org/jboss/seam/contexts/Lifecycle.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Lifecycle.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/Lifecycle.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- Lifecycle.java 3 Nov 2006 22:47:24 -0000 1.63
+++ Lifecycle.java 4 Nov 2006 01:00:14 -0000 1.64
@@ -31,7 +31,7 @@
/**
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.63 $
+ * @version $Revision: 1.64 $
*/
public class Lifecycle
{
@@ -41,7 +41,7 @@
public static void beginRequest(ExternalContext externalContext) {
log.debug( ">>> Begin web request" );
Contexts.eventContext.set( new WebRequestContext( ContextAdaptor.getRequest(externalContext) ) );
- Contexts.sessionContext.set( new WebSessionContext( ContextAdaptor.getSession(externalContext, true) ) );
+ Contexts.sessionContext.set( new WebSessionContext( ContextAdaptor.getSession(externalContext) ) );
Contexts.applicationContext.set( new FacesApplicationContext(externalContext) );
Contexts.conversationContext.set(null); //in case endRequest() was never called
Events.instance(); //TODO: only for now, until we have a way to do EL outside of JSF!
@@ -240,7 +240,7 @@
if ( Seam.isSessionInvalid() )
{
- ContextAdaptor.getSession(externalContext, true).invalidate(); //huh? we create a session just to invalidate it?
+ ContextAdaptor.getSession(externalContext).invalidate(); //huh? we create a session just to invalidate it?
//actual session context will be destroyed from the listener
}
}
@@ -368,7 +368,7 @@
Init init = Init.instance();
Context conversationContext = init.isClientSideConversations() ?
(Context) new ClientConversationContext() :
- (Context) new ServerConversationContext( ContextAdaptor.getSession(externalContext, true) );
+ (Context) new ServerConversationContext( ContextAdaptor.getSession(externalContext) );
Contexts.conversationContext.set( conversationContext );
Contexts.businessProcessContext.set( new BusinessProcessContext() );
}
More information about the jboss-cvs-commits
mailing list