[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Thu Nov 2 21:32:38 EST 2006
User: gavin
Date: 06/11/02 21:32:38
Modified: src/main/org/jboss/seam/contexts Lifecycle.java
Log:
fixed two bugs in exception handling
Revision Changes Path
1.62 +7 -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.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- Lifecycle.java 15 Oct 2006 21:51:59 -0000 1.61
+++ Lifecycle.java 3 Nov 2006 02:32:38 -0000 1.62
@@ -12,6 +12,7 @@
import javax.persistence.Entity;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
@@ -30,7 +31,7 @@
/**
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.61 $
+ * @version $Revision: 1.62 $
*/
public class Lifecycle
{
@@ -101,10 +102,11 @@
Contexts.eventContext.set( new MapContext(ScopeType.EVENT) );
}
- public static void beginExceptionRecovery(ServletContext servletContext, ServletRequest request)
+ public static void beginExceptionRecovery(ServletContext servletContext, HttpServletRequest request)
{
Contexts.applicationContext.set( new WebApplicationContext(servletContext) );
Contexts.eventContext.set( new WebRequestContext( ContextAdaptor.getRequest(request) ) );
+ Contexts.sessionContext.set( new WebSessionContext( ContextAdaptor.getSession( request.getSession() ) ) );
}
public static void endInitialization()
@@ -358,14 +360,15 @@
}
+ //uses the event and session contexts
+ Manager.instance().unlockConversation();
+
if ( Contexts.isSessionContextActive() )
{
log.debug("flushing session context");
Contexts.getSessionContext().flush();
}
- Manager.instance().unlockConversation();
-
//destroy the event context after the
//conversation context, since we need
//the manager to flush() conversation
More information about the jboss-cvs-commits
mailing list