geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r219762 - in /geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty: JettyPOJOWebServiceHolder.java JettyServletHolder.java
Date Tue, 19 Jul 2005 19:43:11 GMT
Author: djencks
Date: Tue Jul 19 12:43:10 2005
New Revision: 219762

URL: http://svn.apache.org/viewcvs?rev=219762&view=rev
Log:
port GERONIMO-645 to M4.  Make load on startup work with WS

Modified:
    geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java
    geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java

Modified: geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java?rev=219762&r1=219761&r2=219762&view=diff
==============================================================================
--- geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java
(original)
+++ geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyPOJOWebServiceHolder.java
Tue Jul 19 12:43:10 2005
@@ -65,6 +65,7 @@
                                      Set servletMappings,
                                      Map webRoleRefPermissions,
                                      StoredObject storedWebServiceContainer,
+                                     ServletHolder previous,    //dependency for startup
ordering
                                      JettyServletRegistration context) throws Exception {
         super(context == null ? null : context.getServletHandler(), servletName, POJOWebServiceServlet.class.getName(),
null);
         //context will be null only for use as "default servlet info holder" in deployer.
@@ -105,38 +106,6 @@
         super.handle(request, response);
     }
 
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JettyPOJOWebServiceHolder.class,
NameFactory.SERVLET_WEB_SERVICE_TEMPLATE);
-        //todo replace with interface
-        infoBuilder.addInterface(ServletHolder.class);
-
-        infoBuilder.addAttribute("pojoClassName", String.class, true);
-        infoBuilder.addAttribute("servletName", String.class, true);
-        infoBuilder.addAttribute("initParams", Map.class, true);
-        infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
-        infoBuilder.addAttribute("servletMappings", Set.class, true);
-        infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
-        infoBuilder.addAttribute("webServiceContainer", StoredObject.class, true);
-        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
-
-        infoBuilder.setConstructor(new String[]{"pojoClassName",
-                                                "servletName",
-                                                "initParams",
-                                                "loadOnStartup",
-                                                "servletMappings",
-                                                "webRoleRefPermissions",
-                                                "webServiceContainer",
-                                                "JettyServletRegistration"});
-
-        GBEAN_INFO = infoBuilder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
     public void doStart() throws Exception {
         if (context != null) {
             Class pojoClass = context.getWebClassLoader().loadClass(pojoClassName);
@@ -169,6 +138,40 @@
     }
 
     public void doFail() {
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(JettyPOJOWebServiceHolder.class,
NameFactory.SERVLET_WEB_SERVICE_TEMPLATE);
+        //todo replace with interface
+        infoBuilder.addInterface(ServletHolder.class);
+
+        infoBuilder.addAttribute("pojoClassName", String.class, true);
+        infoBuilder.addAttribute("servletName", String.class, true);
+        infoBuilder.addAttribute("initParams", Map.class, true);
+        infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
+        infoBuilder.addAttribute("servletMappings", Set.class, true);
+        infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
+        infoBuilder.addAttribute("webServiceContainer", StoredObject.class, true);
+        infoBuilder.addReference("Previous", ServletHolder.class, NameFactory.SERVLET);
+        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
+
+        infoBuilder.setConstructor(new String[]{"pojoClassName",
+                                                "servletName",
+                                                "initParams",
+                                                "loadOnStartup",
+                                                "servletMappings",
+                                                "webRoleRefPermissions",
+                                                "webServiceContainer",
+                                                "Previous",
+                                                "JettyServletRegistration"});
+
+        GBEAN_INFO = infoBuilder.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
     }
 
 

Modified: geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java?rev=219762&r1=219761&r2=219762&view=diff
==============================================================================
--- geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
(original)
+++ geronimo/branches/v1_0_M4-QA/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
Tue Jul 19 12:43:10 2005
@@ -45,11 +45,9 @@
  */
 public class JettyServletHolder extends ServletHolder {
     private static final ThreadLocal currentServletName = new ThreadLocal();
-    private final JettyServletHolder previous;
 
     //todo consider interface instead of this constructor for endpoint use.
     public JettyServletHolder() {
-        this.previous = null;
     }
 
     public JettyServletHolder(String servletName,
@@ -59,13 +57,11 @@
                               Integer loadOnStartup,
                               Set servletMappings,
                               Map webRoleRefPermissions,
-                              JettyServletHolder previous,
+                              ServletHolder previous,  //dependency for startup ordering
                               JettyServletRegistration context) throws Exception {
         super(context == null? null: context.getServletHandler(), servletName, servletClassName,
jspFile);
         //context will be null only for use as "default servlet info holder" in deployer.
 
-        this.previous = previous;
-
         if (context != null) {
             putAll(initParams);
             if (loadOnStartup != null) {
@@ -84,10 +80,6 @@
         return getName();
     }
 
-    public JettyServletHolder getPrevious() {
-        return previous;
-    }
-
     /**
      * Service a request with this servlet.  Set the ThreadLocal to hold the
      * current JettyServletHolder.
@@ -129,7 +121,7 @@
         infoBuilder.addAttribute("servletMappings", Set.class, true);
         infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
 
-        infoBuilder.addReference("Previous", JettyServletHolder.class, NameFactory.DEFAULT_SERVLET);
+        infoBuilder.addReference("Previous", ServletHolder.class, NameFactory.SERVLET);
         infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class,
NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[] {"servletName",



Mime
View raw message