[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Sun Jun 3 13:52:15 EDT 2007
User: gavin
Date: 07/06/03 13:52:15
Modified: src/main/org/jboss/seam Seam.java
Log:
JBSEAM-1390
Revision Changes Path
1.30 +11 -15 jboss-seam/src/main/org/jboss/seam/Seam.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Seam.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Seam.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- Seam.java 18 May 2007 16:27:06 -0000 1.29
+++ Seam.java 3 Jun 2007 17:52:15 -0000 1.30
@@ -1,4 +1,4 @@
-//$Id: Seam.java,v 1.29 2007/05/18 16:27:06 gavin Exp $
+//$Id: Seam.java,v 1.30 2007/06/03 17:52:15 gavin Exp $
package org.jboss.seam;
import static org.jboss.seam.ComponentType.ENTITY_BEAN;
@@ -22,6 +22,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.core.Session;
import org.jboss.seam.util.Strings;
/**
@@ -33,7 +34,6 @@
public class Seam
{
- private static final String SESSION_INVALID = "org.jboss.seam.sessionInvalid";
private static final Map<Class, String> COMPONENT_NAME_CACHE = new ConcurrentHashMap<Class, String>();
/**
@@ -206,28 +206,24 @@
}
}
/**
- * Mark the session for invalidation at the end of the request cycle
+ * Mark the session for invalidation at the end of the
+ * request cycle
+ *
+ * @deprecated use Session.instance().invalidate()
*/
public static void invalidateSession()
{
- if ( !Contexts.isSessionContextActive() )
- {
- throw new IllegalStateException("No active session context");
- }
- Contexts.getSessionContext().set(SESSION_INVALID, true);
+ Session.instance().invalidate();
}
/**
* Is the session marked for invalidation?
+ *
+ * @deprecated use Session.instance().isInvalidated()
*/
public static boolean isSessionInvalid()
{
- if ( !Contexts.isSessionContextActive() )
- {
- throw new IllegalStateException("No active session context");
- }
- Boolean isSessionInvalid = (Boolean) Contexts.getSessionContext().get(SESSION_INVALID);
- return isSessionInvalid!=null && isSessionInvalid;
+ return Session.instance().isInvalid();
}
/**
More information about the jboss-cvs-commits
mailing list