geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r598410 - /geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
Date Mon, 26 Nov 2007 20:14:52 GMT
Author: djencks
Date: Mon Nov 26 12:14:52 2007
New Revision: 598410

URL: http://svn.apache.org/viewvc?rev=598410&view=rev
Log:
GERONIMO-3609 Make sure x-context dispatch gets correct jndi context.  Might possibly duplicate
setting jndi context for in-context dispatch

Modified:
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java?rev=598410&r1=598409&r2=598410&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
Mon Nov 26 12:14:52 2007
@@ -17,8 +17,6 @@
 
 package org.apache.geronimo.jetty6;
 
-import java.io.File;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -58,7 +56,6 @@
 import org.apache.geronimo.kernel.ObjectNameUtil;
 import org.apache.geronimo.management.J2EEApplication;
 import org.apache.geronimo.management.J2EEServer;
-import org.apache.geronimo.management.geronimo.WebConnector;
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebModule;
 import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
@@ -66,7 +63,6 @@
 import org.apache.geronimo.transaction.GeronimoUserTransaction;
 import org.mortbay.jetty.MimeTypes;
 import org.mortbay.jetty.handler.AbstractHandler;
-import org.mortbay.jetty.handler.AbstractHandlerContainer;
 import org.mortbay.jetty.security.Authenticator;
 import org.mortbay.jetty.servlet.ErrorPageErrorHandler;
 import org.mortbay.jetty.servlet.ServletHandler;
@@ -96,7 +92,6 @@
 
     private final String objectName;
     private final WebAppContext webAppContext;//delegate
-    private final AbstractHandlerContainer contextHandler;
     private final AbstractImmutableHandler lifecycleChain;
     private final Context componentContext;
     private final Holder holder;
@@ -178,7 +173,6 @@
         //wrap the web app context with the jndi handler
         GeronimoUserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
         this.componentContext = EnterpriseNamingContext.createEnterpriseNamingContext(componentContext,
userTransaction, kernel, classLoader);
-        contextHandler = new ComponentContextHandler(webAppContext, this.componentContext);
 
         //install jasper injection support if required
         if (contextCustomizer != null) {
@@ -200,6 +194,7 @@
 
             next = new InstanceContextHandler(next, unshareableResources, applicationManagedSecurityResources,
trackedConnectionAssociator);
             next = new UserTransactionHandler(next, userTransaction);
+            next = new ComponentContextHandler(next, this.componentContext);
             webAppContext.setHandler(next);
 
             //install another component context handler for the lifecycle chain
@@ -365,20 +360,20 @@
 
         public void lifecycleMethod() throws Exception {
             //order seems backwards... .maybe container is calling start itself???
-            jettyContainer.addContext(contextHandler);
-            contextHandler.start();
+            jettyContainer.addContext(webAppContext);
+            webAppContext.start();
         }
     }
 
     public class StopCommand implements LifecycleCommand {
 
         public void lifecycleMethod() throws Exception {
-            contextHandler.stop();
+            webAppContext.stop();
             //TODO is this order correct?
             for (EventListener listener : webAppContext.getEventListeners()) {
                 destroyInstance(listener);
             }
-            jettyContainer.removeContext(contextHandler);
+            jettyContainer.removeContext(webAppContext);
         }
     }
     //pass through attributes.  They should be constructor params



Mime
View raw message