geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty JettyWebAccessLog.java JettyWebConnector.java JettyWebContainer.java
Date Sat, 17 Jan 2004 17:02:39 GMT
djencks     2004/01/17 09:02:39

  Modified:    modules/web/src/java/org/apache/geronimo/web
                        AbstractWebConnector.java AbstractWebContainer.java
               modules/web/src/java/org/apache/geronimo/web/jetty
                        JettyWebAccessLog.java JettyWebConnector.java
                        JettyWebContainer.java
  Added:       modules/web/src/deploy/jetty geronimo-service.xml
  Log:
  Fixes to boot as GBeans
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/modules/web/src/deploy/jetty/geronimo-service.xml
  
  Index: geronimo-service.xml
  ===================================================================
  <gbeans>
      <gbean class="org.apache.geronimo.web.jetty.JettyWebContainer" objectName="geronimo.web:type=WebContainer,container=Jetty">
          <default attribute="DefaultWebXmlURI" type="java.net.URI">webdefault.xml</default>
          <endpoint name="WebAccessLogs">
              <pattern>geronimo.web:type=WebAccessLog,container=Jetty,*</pattern>
          </endpoint>
          <endpoint name="WebApplications">
              <pattern>geronimo.web:type=WebApplication,container=Jetty,*</pattern>
          </endpoint>
          <endpoint name="WebConnectors">
              <pattern>geronimo.web:type=WebConnector,container=Jetty,*</pattern>
          </endpoint>
      </gbean>
      <gbean class="org.apache.geronimo.web.jetty.JettyWebConnector" objectName="geronimo.web:type=WebConnector,container=Jetty,port=8080">
          <default attribute="Protocol" type="java.lang.String">http</default>
          <default attribute="Interface" type="java.lang.String">localhost</default>
          <default attribute="Port" type="int">8080</default>
          <default attribute="MaxConnections" type="int">10</default>
          <default attribute="MaxIdleTime" type="int">10</default>
          <!--default attribute="Contexts" type="java.lang.String[]"></default-->
      </gbean>
  </gbeans>
  
  
  1.9       +4 -2      incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/AbstractWebConnector.java
  
  Index: AbstractWebConnector.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/AbstractWebConnector.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AbstractWebConnector.java	16 Jan 2004 23:31:21 -0000	1.8
  +++ AbstractWebConnector.java	17 Jan 2004 17:02:38 -0000	1.9
  @@ -47,7 +47,9 @@
           this.port = port;
           this.maxConnections = maxConnections;
           this.maxIdleTime = maxIdleTime;
  -        this.contexts = Arrays.asList(contexts);
  +        if (contexts != null) {
  +            this.contexts = Arrays.asList(contexts);
  +        }
       }
   
       /* (non-Javadoc)
  
  
  
  1.29      +11 -12    incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/AbstractWebContainer.java
  
  Index: AbstractWebContainer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/AbstractWebContainer.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- AbstractWebContainer.java	16 Jan 2004 23:31:21 -0000	1.28
  +++ AbstractWebContainer.java	17 Jan 2004 17:02:38 -0000	1.29
  @@ -65,18 +65,17 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.geronimo.gbean.EndpointCollection;
  +import org.apache.geronimo.gbean.EndpointCollectionEvent;
  +import org.apache.geronimo.gbean.EndpointCollectionListener;
  +import org.apache.geronimo.gbean.GAttributeInfo;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GConstructorInfo;
  +import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.geronimo.kernel.service.GeronimoMBeanEndpoint;
   import org.apache.geronimo.kernel.service.GeronimoMBeanEndpointListener;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  -import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
  -import org.apache.geronimo.gbean.GBeanInfoFactory;
  -import org.apache.geronimo.gbean.GBeanInfo;
  -import org.apache.geronimo.gbean.GAttributeInfo;
  -import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.gbean.GEndpointInfo;
  -import org.apache.geronimo.gbean.EndpointCollection;
  -import org.apache.geronimo.gbean.EndpointCollectionListener;
  -import org.apache.geronimo.gbean.EndpointCollectionEvent;
   import org.w3c.dom.Document;
   
   /**
  @@ -157,9 +156,8 @@
   
       }
   
  -    public AbstractWebContainer(URI defaultWebXmlURI, Document defaultWebXmlDoc) {
  +    public AbstractWebContainer(URI defaultWebXmlURI) {
           this.defaultWebXmlURI = defaultWebXmlURI;
  -        this.defaultWebXmlDoc = defaultWebXmlDoc;
       }
   
       /**
  @@ -374,4 +372,5 @@
           }, webAccessLogClass, ObjectName.getInstance(BASE_WEB_ACCESS_LOG_NAME + CONTAINER_CLAUSE
+ container + ",*")));
           return mbeanInfo;
       }
  +
   }
  
  
  
  1.6       +5 -4      incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebAccessLog.java
  
  Index: JettyWebAccessLog.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebAccessLog.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JettyWebAccessLog.java	16 Jan 2004 23:31:21 -0000	1.5
  +++ JettyWebAccessLog.java	17 Jan 2004 17:02:38 -0000	1.6
  @@ -69,6 +69,7 @@
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GConstructorInfo;
   import org.apache.geronimo.gbean.GOperationInfo;
  +import org.apache.geronimo.gbean.GBean;
   import org.apache.geronimo.kernel.service.GeronimoAttributeInfo;
   import org.apache.geronimo.kernel.service.GeronimoMBeanContext;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  @@ -87,7 +88,7 @@
    *
    * @version $Revision$ $Date$
    */
  -public class JettyWebAccessLog extends AbstractWebAccessLog implements GeronimoMBeanTarget
{
  +public class JettyWebAccessLog extends AbstractWebAccessLog implements GeronimoMBeanTarget,
GBean {
   
       private static final GBeanInfo GBEAN_INFO;
   
  @@ -163,7 +164,7 @@
       }
   
       public boolean canStart() {
  -        return false;
  +        return true;
       }
   
       public void doStart() {
  @@ -235,7 +236,7 @@
       }
   
       public boolean canStop() {
  -        return false;
  +        return true;
       }
   
       public void doStop() {
  
  
  
  1.10      +3 -3      incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebConnector.java
  
  Index: JettyWebConnector.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebConnector.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JettyWebConnector.java	16 Jan 2004 23:31:21 -0000	1.9
  +++ JettyWebConnector.java	17 Jan 2004 17:02:38 -0000	1.10
  @@ -58,10 +58,10 @@
   
   import java.lang.reflect.Constructor;
   import java.util.Collections;
  -import java.util.List;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.geronimo.gbean.GBean;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GOperationInfo;
  @@ -80,7 +80,7 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class JettyWebConnector extends AbstractWebConnector implements GeronimoMBeanTarget
{
  +public class JettyWebConnector extends AbstractWebConnector implements GeronimoMBeanTarget,
GBean {
       private final static GBeanInfo GBEAN_INFO;
       private final static Log log = LogFactory.getLog(JettyWebConnector.class);
       private final static Class[] _defaultConstructorSignature = new Class[]{};
  
  
  
  1.14      +12 -13    incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebContainer.java
  
  Index: JettyWebContainer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/web/src/java/org/apache/geronimo/web/jetty/JettyWebContainer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- JettyWebContainer.java	16 Jan 2004 23:31:21 -0000	1.13
  +++ JettyWebContainer.java	17 Jan 2004 17:02:38 -0000	1.14
  @@ -56,26 +56,24 @@
   
   package org.apache.geronimo.web.jetty;
   
  +import java.net.URI;
   import java.util.Arrays;
   import java.util.Collection;
  -import java.net.URI;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.geronimo.gbean.GBeanInfo;
  +import org.apache.geronimo.gbean.GBeanInfoFactory;
  +import org.apache.geronimo.gbean.GConstructorInfo;
  +import org.apache.geronimo.gbean.GEndpointInfo;
   import org.apache.geronimo.kernel.management.StateManageable;
   import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
   import org.apache.geronimo.web.AbstractWebContainer;
  -import org.apache.geronimo.web.WebApplication;
   import org.apache.geronimo.web.WebAccessLog;
  +import org.apache.geronimo.web.WebApplication;
   import org.apache.geronimo.web.WebConnector;
  -import org.apache.geronimo.gbean.GBeanInfo;
  -import org.apache.geronimo.gbean.GBeanInfoFactory;
  -import org.apache.geronimo.gbean.GEndpointInfo;
  -import org.apache.geronimo.gbean.GConstructorInfo;
  -import org.apache.geronimo.gbean.GAttributeInfo;
   import org.mortbay.jetty.Server;
   import org.mortbay.jetty.servlet.WebApplicationContext;
  -import org.w3c.dom.Document;
   
   /**
    * Base class for jetty web containers.
  @@ -98,8 +96,8 @@
           jettyServer.start();
       }
   
  -    public JettyWebContainer(URI defaultWebXmlURI, Document defaultWebXmlDoc, Collection
webApplications, Collection webConnectors, Collection webAccessLogs) throws Exception {
  -        super(defaultWebXmlURI, defaultWebXmlDoc);
  +    public JettyWebContainer(URI defaultWebXmlURI, Collection webApplications, Collection
webConnectors, Collection webAccessLogs) throws Exception {
  +        super(defaultWebXmlURI);
           jettyServer = new Server();
           jettyServer.start();
           //Does order matter here?
  @@ -224,8 +222,8 @@
           infoFactory.addEndpoint(new GEndpointInfo("WebConnectors", JettyWebConnector.class.getName()));
           infoFactory.addEndpoint(new GEndpointInfo("WebAccessLogs", JettyWebAccessLog.class.getName()));
           infoFactory.setConstructor(new GConstructorInfo(
  -                Arrays.asList(new Object[] {"DefaultWebXmlURI", "DefaultWebXmlDoc", "WebApplications",
"WebConnectors", "WebAccessLogs", }),
  -                Arrays.asList(new Object[] {URI.class, Document.class, Collection.class,
Collection.class, Collection.class })));
  +                Arrays.asList(new Object[] {"DefaultWebXmlURI", "WebApplications", "WebConnectors",
"WebAccessLogs"}),
  +                Arrays.asList(new Object[] {URI.class, Collection.class, Collection.class,
Collection.class})));
            GBEAN_INFO = infoFactory.getBeanInfo();
       }
   
  @@ -239,4 +237,5 @@
       public static GeronimoMBeanInfo getGeronimoMBeanInfo() throws Exception {
           return AbstractWebContainer.getGeronimoMBeanInfo(JettyWebContainer.class, "Jetty",
JettyWebApplication.class, JettyWebConnector.class, JettyWebAccessLog.class);
       }
  +
   }
  
  
  

Mime
View raw message