geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r448418 - in /geronimo/sandbox/javaee5/modules-jee5: geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/ geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/ geronimo-jetty6/src/test/java/org/apache/geronimo/je...
Date Thu, 21 Sep 2006 00:56:25 GMT
Author: djencks
Date: Wed Sep 20 17:56:24 2006
New Revision: 448418

URL: http://svn.apache.org/viewvc?view=rev&rev=448418
Log:
Use delegation to jetty6 objects rather than subclassing to avoid proxy problems with final
methods

Modified:
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
    geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
Wed Sep 20 17:56:24 2006
@@ -588,7 +588,7 @@
             String filterName = filterMappingType.getFilterName().getStringValue().trim();
             GBeanData filterMappingData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
             if (previous != null) {
-                filterMappingData.setReferencePattern("Previous", previous);
+                filterMappingData.addDependency(previous);
             }
             filterMappingData.setReferencePattern("JettyServletRegistration", moduleName);
             AbstractName filterAbstractName = earContext.getNaming().createChildName(moduleName,
filterName, NameFactory.WEB_FILTER);
@@ -656,7 +656,7 @@
 
             GBeanData filterMappingGBeanData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
             if (previous != null) {
-                filterMappingGBeanData.setReferencePattern("Previous", previous);
+                filterMappingGBeanData.addDependency(previous);
             }
             filterMappingGBeanData.setReferencePattern("JettyServletRegistration", moduleName);
             String urlPattern = "/*";
@@ -981,7 +981,7 @@
         // preserve the <load-on-startup> ordering.
         // http://issues.apache.org/jira/browse/GERONIMO-645
         if (null != previousServlet) {
-            servletData.setReferencePattern("Previous", previousServlet);
+            servletData.addDependency(previousServlet);
         }
 
         //TODO in init param setter, add classpath if jspFile is not null.

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
Wed Sep 20 17:56:24 2006
@@ -35,8 +35,8 @@
     public JettyDefaultServletHolder() {
     }
 
-    public JettyDefaultServletHolder(String objectName, String servletName, String servletClassName,
String jspFile, Map initParams, Integer loadOnStartup, Set servletMappings, Subject runAsSubject,
ServletHolder previous, JettyServletRegistration context) throws Exception {
-        super(objectName, servletName, servletClassName, jspFile, initParams, loadOnStartup,
servletMappings, runAsSubject, previous, context);
+    public JettyDefaultServletHolder(String objectName, String servletName, String servletClassName,
String jspFile, Map initParams, Integer loadOnStartup, Set servletMappings, Subject runAsSubject,
JettyServletRegistration context) throws Exception {
+        super(objectName, servletName, servletClassName, jspFile, initParams, loadOnStartup,
servletMappings, runAsSubject, context);
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
Wed Sep 20 17:56:24 2006
@@ -20,41 +20,61 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.jetty.servlet.FilterHolder;
 
 /**
  * @version $Rev$ $Date$
  */
-public class JettyFilterHolder extends FilterHolder {
+public class JettyFilterHolder implements GBeanLifecycle {
+
+    private final FilterHolder filterHolder;
 
     //todo consider an interface instead of this constructor for endpoint use.
     public JettyFilterHolder() {
+        filterHolder = null;
     }
 
     public JettyFilterHolder(String filterName, String filterClass, Map initParams, JettyServletRegistration
jettyServletRegistration) throws Exception {
-        super();
+        filterHolder = new FilterHolder();
         if (jettyServletRegistration != null) {
-            setName(filterName);
-            setClassName(filterClass);
-            setInitParameters(initParams);
-            (jettyServletRegistration.getServletHandler()).addFilter(this);
-
-            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
-            try {
-                ClassLoader newCL = jettyServletRegistration.getWebClassLoader();
-                Thread.currentThread().setContextClassLoader(newCL);
-                start();
-            } finally {
-                Thread.currentThread().setContextClassLoader(oldCL);
-            }
+            filterHolder.setName(filterName);
+            filterHolder.setClassName(filterClass);
+            filterHolder.setInitParameters(initParams);
+            (jettyServletRegistration.getServletHandler()).addFilter(filterHolder);
+
+//            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
+//            try {
+//                ClassLoader newCL = jettyServletRegistration.getWebClassLoader();
+//                Thread.currentThread().setContextClassLoader(newCL);
+//                start();
+//            } finally {
+//                Thread.currentThread().setContextClassLoader(oldCL);
+//            }
         }
     }
 
     public String getFilterName() {
-        return getName();
+        return filterHolder.getName();
+    }
+
+    public void doStart() throws Exception {
+            filterHolder.start();
     }
 
+    public void doStop() throws Exception {
+                filterHolder.stop();
+    }
+
+    public void doFail() {
+        try {
+            filterHolder.stop();
+        } catch (Exception e) {
+            //ignore?
+        }
+    }
+    
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterMapping.java
Wed Sep 20 17:56:24 2006
@@ -23,6 +23,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.jetty.servlet.FilterMapping;
 import org.mortbay.jetty.Handler;
@@ -30,7 +31,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class JettyFilterMapping extends FilterMapping implements Serializable {
+public class JettyFilterMapping extends FilterMapping {
 
     private final String[] urlPatterns;
     private final boolean requestDispatch;

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
Wed Sep 20 17:56:24 2006
@@ -45,15 +45,20 @@
  *
  * @version $Rev$ $Date$
  */
-public class JettyPOJOWebServiceHolder extends ServletHolder implements GBeanLifecycle {
-    private WebServiceContainer webServiceContainer;
-    private Set servletMappings;
-    private JettyServletRegistration context;
-    private String pojoClassName;
+public class JettyPOJOWebServiceHolder implements GBeanLifecycle {
+    private final ServletHolder servletHolder;
+    private final WebServiceContainer webServiceContainer;
+    private final Set servletMappings;
+    private final JettyServletRegistration context;
+    private final String pojoClassName;
 
     //todo consider interface instead of this constructor for endpoint use.
     public JettyPOJOWebServiceHolder() {
-
+        servletHolder = null;
+        webServiceContainer = null;
+        servletMappings = null;
+        context = null;
+        pojoClassName = null;
     }
 
     public JettyPOJOWebServiceHolder(String pojoClassName,
@@ -62,22 +67,21 @@
             Integer loadOnStartup,
             Set servletMappings,
             WebServiceContainer webServiceContainer,
-            ServletHolder previous,    //dependency for startup ordering
             JettyServletRegistration context) throws Exception {
-        super();
+        servletHolder = new ServletHolder();
         //context will be null only for use as "default servlet info holder" in deployer.
 
         this.pojoClassName = pojoClassName;
         this.context = context;
         this.webServiceContainer = webServiceContainer;
+        this.servletMappings = servletMappings;
         if (context != null) {
-            setName(servletName);
-            setClassName(POJOWebServiceServlet.class.getName());
-            setInitParameters(initParams);
+            servletHolder.setName(servletName);
+            servletHolder.setClassName(POJOWebServiceServlet.class.getName());
+            servletHolder.setInitParameters(initParams);
             if (loadOnStartup != null) {
-                setInitOrder(loadOnStartup.intValue());
+                servletHolder.setInitOrder(loadOnStartup.intValue());
             }
-            this.servletMappings = servletMappings;
         }
     }
 
@@ -85,7 +89,7 @@
     //todo is start called twice???
 
     public String getServletName() {
-        return getName();
+        return servletHolder.getName();
     }
 
     /**
@@ -101,7 +105,7 @@
         JettyServletHolder.setCurrentServletName(getServletName());
         PolicyContext.setHandlerData(Request.getRequest((HttpServletRequest) request));
 
-        super.handle(request, response);
+        servletHolder.handle(request, response);
     }
 
     public void doStart() throws Exception {
@@ -117,25 +121,31 @@
             // put a reference the ID in the init-params
             // put the WebServiceContainer in the webapp context keyed by its ID
             String webServicecontainerID = getServletName() + WebServiceContainerInvoker.WEBSERVICE_CONTAINER
+ webServiceContainer.hashCode();
-            setInitParameter(WebServiceContainerInvoker.WEBSERVICE_CONTAINER, webServicecontainerID);
+            servletHolder.setInitParameter(WebServiceContainerInvoker.WEBSERVICE_CONTAINER,
webServicecontainerID);
             servletContext.setAttribute(webServicecontainerID, webServiceContainer);
 
             // Same for the POJO Class
             String pojoClassID = getServletName() + POJOWebServiceServlet.POJO_CLASS + pojoClass.hashCode();
-            setInitParameter(POJOWebServiceServlet.POJO_CLASS, pojoClassID);
+            servletHolder.setInitParameter(POJOWebServiceServlet.POJO_CLASS, pojoClassID);
             servletContext.setAttribute(pojoClassID, pojoClass);
 
             //this now starts the servlet in the appropriate context
             //TODO check that we should not call this a servlet for jsr-77 benefit.
-            context.registerServletHolder(this, getServletName(), this.servletMappings, null);
-//            start();
+            context.registerServletHolder(servletHolder, getServletName(), this.servletMappings,
null);
+            servletHolder.start();
         }
     }
 
-    public void doStop() {
+    public void doStop() throws Exception {
+        servletHolder.stop();
     }
 
     public void doFail() {
+        try {
+            servletHolder.stop();
+        } catch (Exception e) {
+            //ignore ??
+        }
     }
 
     public static final GBeanInfo GBEAN_INFO;
@@ -143,7 +153,7 @@
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JettyPOJOWebServiceHolder.class,
NameFactory.SERVLET_WEB_SERVICE_TEMPLATE);
         //todo replace with interface
-        infoBuilder.addInterface(ServletHolder.class);
+//        infoBuilder.addInterface(ServletHolder.class);
 
         infoBuilder.addAttribute("pojoClassName", String.class, true);
         infoBuilder.addAttribute("servletName", String.class, true);
@@ -151,7 +161,6 @@
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
         infoBuilder.addAttribute("webServiceContainer", WebServiceContainer.class, true);
-        infoBuilder.addReference("Previous", ServletHolder.class, NameFactory.SERVLET);
         infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
 
         infoBuilder.setConstructor(new String[]{"pojoClassName",
@@ -160,7 +169,6 @@
                 "loadOnStartup",
                 "servletMappings",
                 "webServiceContainer",
-                "Previous",
                 "JettyServletRegistration"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettySecurityHandler.java
Wed Sep 20 17:56:24 2006
@@ -32,10 +32,10 @@
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.GeronimoSecurityException;
+import org.apache.geronimo.security.Callers;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.IdentificationPrincipal;
 import org.apache.geronimo.security.SubjectId;
-import org.apache.geronimo.security.Callers;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.security.util.ConfigurationUtil;
 import org.mortbay.jetty.HttpException;

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
Wed Sep 20 17:56:24 2006
@@ -28,6 +28,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.Servlet;
 import org.apache.geronimo.security.Callers;
@@ -45,13 +46,17 @@
  * @version $Rev$ $Date$
  * @see JAASJettyRealm#isUserInRole(java.security.Principal, String)
  */
-public class JettyServletHolder extends ServletHolder implements Servlet {
+public class JettyServletHolder implements Servlet, GBeanLifecycle {
+
     private static final ThreadLocal currentServletName = new ThreadLocal();
+
+    private final ServletHolder servletHolder;
     private final Subject runAsSubject;
     private final String objectName;
 
     //todo consider interface instead of this constructor for endpoint use.
     public JettyServletHolder() {
+        this.servletHolder = null;
         this.objectName = null;
         this.runAsSubject = null;
     }
@@ -64,32 +69,28 @@
             Integer loadOnStartup,
             Set servletMappings,
             Subject runAsSubject,
-            ServletHolder previous,  //dependency for startup ordering
             JettyServletRegistration context) throws Exception {
-        super();
-        setName(servletName);
-        setClassName(servletClassName);
+        servletHolder = new ServletHolder();
+        servletHolder.setName(servletName);
+        servletHolder.setClassName(servletClassName);
         //context will be null only for use as "default servlet info holder" in deployer.
 
         if (context != null) {
-            setInitParameters(initParams);
-            setForcedPath(jspFile);
+            servletHolder.setInitParameters(initParams);
+            servletHolder.setForcedPath(jspFile);
             if (loadOnStartup != null) {
                 //This has no effect on the actual start order, the gbean references "previous"
control that.
-                setInitOrder(loadOnStartup.intValue());
+                servletHolder.setInitOrder(loadOnStartup.intValue());
             }
             //this now starts the servlet in the appropriate context
-            context.registerServletHolder(this, servletName, servletMappings, objectName);
+            context.registerServletHolder(servletHolder, servletName, servletMappings, objectName);
         }
         this.runAsSubject = runAsSubject;
         this.objectName = objectName;
     }
 
-    //todo how do we stop/destroy the servlet?
-    //todo is start called twice???
-
     public String getServletName() {
-        return getName();
+        return servletHolder.getName();
     }
 
     //TODO probably need to override init and destroy (?) to handle runAsSubject since we
are not setting it in the superclass any more.
@@ -103,11 +104,11 @@
 
         setCurrentServletName(getServletName());
         if (runAsSubject == null) {
-            super.handle(request, response);
+            servletHolder.handle(request, response);
         } else {
             Callers oldCallers = ContextManager.pushNextCaller(runAsSubject);
             try {
-                super.handle(request, response);
+                servletHolder.handle(request, response);
             } finally {
                 ContextManager.popCallers(oldCallers);
             }
@@ -144,12 +145,28 @@
         return false;
     }
 
+    public void doStart() throws Exception {
+        servletHolder.start();
+    }
+
+    public void doStop() throws Exception {
+        servletHolder.stop();
+    }
+
+    public void doFail() {
+        try {
+            servletHolder.stop();
+        } catch (Exception e) {
+            //?? ignore
+        }
+    }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(JettyServletHolder.class,
NameFactory.SERVLET);
         //todo replace with interface
-        infoBuilder.addInterface(ServletHolder.class);
+//        infoBuilder.addInterface(ServletHolder.class);
 
         infoBuilder.addAttribute("servletName", String.class, true);
         infoBuilder.addAttribute("servletClass", String.class, true);
@@ -161,7 +178,6 @@
         infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addInterface(Servlet.class);
 
-        infoBuilder.addReference("Previous", ServletHolder.class, NameFactory.SERVLET);
         infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class,
NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[]{"objectName",
@@ -172,7 +188,6 @@
                 "loadOnStartup",
                 "servletMappings",
                 "runAsSubject",
-                "Previous",
                 "JettyServletRegistration"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();
@@ -181,4 +196,5 @@
     public static GBeanInfo getGBeanInfo() {
         return GBEAN_INFO;
     }
+
 }

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java
Wed Sep 20 17:56:24 2006
@@ -331,7 +331,6 @@
         jettyContainer.addContext(this.webAppContext);
         Object context = enterContextScope(null, null);
         try {
-            //TODO: this used to be doStart() not start() - why?
             this.webAppContext.start();
         } finally {
             leaveContextScope(null, null, context);
@@ -344,12 +343,6 @@
     }
 
     public void doStop() throws Exception {
-        // merge Geronimo and Jetty Lifecycles
-        if (!this.webAppContext.isStopping()) {
-            this.webAppContext.stop();
-            return;
-        }
-
         Object context = enterContextScope(null, null);
         try {
             this.webAppContext.stop();
@@ -366,7 +359,7 @@
 
     public void doFail() {
         try {
-            this.webAppContext.stop();
+            doStop();
         } catch (Exception e) {
         }
 

Modified: geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java?view=diff&rev=448418&r1=448417&r2=448418
==============================================================================
--- geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
(original)
+++ geronimo/sandbox/javaee5/modules-jee5/geronimo-jetty6/src/test/java/org/apache/geronimo/jetty6/AbstractWebModuleTest.java
Wed Sep 20 17:56:24 2006
@@ -81,7 +81,6 @@
                 null,
                 Collections.singleton("/"),
                 null,
-                null,
                 webModule);
 
     }



Mime
View raw message