[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...

Gavin King gavin.king at jboss.com
Sun Dec 3 02:01:48 EST 2006


  User: gavin   
  Date: 06/12/03 02:01:47

  Modified:    src/main/org/jboss/seam/contexts  Lifecycle.java
  Log:
  fix bad handling of contexts during logout
  don't redirect to the debug page when not in a JSF request
  
  Revision  Changes    Path
  1.69      +11 -8     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.68
  retrieving revision 1.69
  diff -u -b -r1.68 -r1.69
  --- Lifecycle.java	2 Dec 2006 07:51:33 -0000	1.68
  +++ Lifecycle.java	3 Dec 2006 07:01:47 -0000	1.69
  @@ -31,7 +31,7 @@
   /**
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.68 $
  + * @version $Revision: 1.69 $
    */
   public class Lifecycle
   {
  @@ -249,6 +249,8 @@
   
            if ( Seam.isSessionInvalid() )
            {
  +            clearThreadlocals();
  +            Lifecycle.setPhaseId(null);
               ContextAdaptor.getSession(externalContext).invalidate(); //huh? we create a session just to invalidate it?
               //actual session context will be destroyed from the listener
            }
  @@ -287,6 +289,7 @@
   
            if ( Seam.isSessionInvalid() )
            {
  +            clearThreadlocals();
               ContextAdaptor.getSession(session).invalidate(); //huh? we create a session just to invalidate it?
               //actual session context will be destroyed from the listener
   
  @@ -302,12 +305,12 @@
      }
   
      private static void clearThreadlocals() {
  -      Contexts.eventContext.set( null );
  -      Contexts.pageContext.set( null );
  -      Contexts.sessionContext.set( null );
  -      Contexts.conversationContext.set( null );
  -      Contexts.businessProcessContext.set( null );
  -      Contexts.applicationContext.set( null );
  +      Contexts.eventContext.set(null);
  +      Contexts.pageContext.set(null);
  +      Contexts.sessionContext.set(null);
  +      Contexts.conversationContext.set(null);
  +      Contexts.businessProcessContext.set(null);
  +      Contexts.applicationContext.set(null);
      }
   
      private static void flushAndDestroyContexts()
  
  
  



More information about the jboss-cvs-commits mailing list