geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r810767 [2/2] - in /geronimo/server/trunk: framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/ plugins/console/console-base-portlets/src/main/java/org/apache/geronimo/console/webmanager/ plugins/jett...
Date Thu, 03 Sep 2009 03:07:06 GMT
Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
Thu Sep  3 03:07:05 2009
@@ -20,16 +20,26 @@
 
 import java.util.Map;
 
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.catalina.connector.Connector;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
+@GBean(name="Tomcat Connector HTTPS BIO")
 public class Https11ConnectorGBean extends Http11ConnectorGBean {
 
-    public Https11ConnectorGBean(String name, Map initParams, String host, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
-        super(name, initParams, host, port, container, serverInfo);
+    public Https11ConnectorGBean(@ParamAttribute(name = "name") String name,
+                                 @ParamAttribute(name = "initParams") Map<String, String>
initParams,
+                                 @ParamAttribute(name = "host") String host,
+                                 @ParamAttribute(name = "port") int port,
+                                 @ParamReference(name = "TomcatContainer") TomcatContainer
container,
+                                 @ParamReference(name = "ServerInfo") ServerInfo serverInfo,
+                                 @ParamAttribute(name = "connector") Connector conn)  throws
Exception {
+                                 
+        super(name, initParams, host, port, container, serverInfo, conn);
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
@@ -42,16 +52,5 @@
     public String getGeronimoProtocol(){
         return WebManager.PROTOCOL_HTTPS;
     }
-    
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector HTTPS
BIO", Https11ConnectorGBean.class, Http11ConnectorGBean.GBEAN_INFO);
-        infoFactory.setConstructor(new String[] { "name", "initParams", "host", "port", "TomcatContainer",
"ServerInfo"});
-        GBEAN_INFO = infoFactory.getBeanInfo();
-    }
-    
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }    
+  
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
Thu Sep  3 03:07:05 2009
@@ -20,16 +20,26 @@
 
 import java.util.Map;
 
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.catalina.connector.Connector;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
+@GBean(name="Tomcat Connector HTTPS NIO")
 public class Https11NIOConnectorGBean extends Http11NIOConnectorGBean {
 
-    public Https11NIOConnectorGBean(String name, Map initParams, String host, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
-        super(name, initParams, host, port, container, serverInfo);
+    public Https11NIOConnectorGBean(@ParamAttribute(name = "name") String name,
+                                    @ParamAttribute(name = "initParams") Map<String, String>
initParams,
+                                    @ParamAttribute(name = "host") String host,
+                                    @ParamAttribute(name = "port") int port,
+                                    @ParamReference(name = "TomcatContainer") TomcatContainer
container,
+                                    @ParamReference(name = "ServerInfo") ServerInfo serverInfo,
+                                    @ParamAttribute(name = "connector") Connector conn) 
throws Exception {
+            
+        super(name, initParams, host, port, container, serverInfo, conn);
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
@@ -43,15 +53,4 @@
         return WebManager.PROTOCOL_HTTPS;
     }
     
-    public static final GBeanInfo GBEAN_INFO;
-
-    static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector HTTPS
NIO", Https11NIOConnectorGBean.class, Http11NIOConnectorGBean.GBEAN_INFO);
-        infoFactory.setConstructor(new String[] { "name", "initParams", "host", "port", "TomcatContainer",
"ServerInfo"});
-        GBEAN_INFO = infoFactory.getBeanInfo();
-    }
-    
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }    
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/model/ConnectorType.java
Thu Sep  3 03:07:05 2009
@@ -12,7 +12,6 @@
 import java.util.Map;
 import java.util.List;
 import java.util.ArrayList;
-import java.lang.reflect.Constructor;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
@@ -26,6 +25,7 @@
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Service;
 import org.apache.catalina.Executor;
+import org.apache.geronimo.tomcat.TomcatServerGBean;
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.Option;
 import org.apache.tomcat.util.IntrospectionUtils;
@@ -607,7 +607,11 @@
                         java.util.concurrent.Executor.class.getName(),
                         cl);
 
-            } else {
+            } else if("name".equals(name)){
+                
+                TomcatServerGBean.ConnectorName.put(connector, entry.getValue());
+                
+            } else{
                 connector.setProperty(name, entry.getValue());
             }
         }
@@ -615,6 +619,7 @@
         for (ListenerType listenerType : getListener()) {
             LifecycleListener listener = listenerType.getLifecycleListener(cl);
             connector.addLifecycleListener(listener);
+            TomcatServerGBean.LifecycleListeners.add(listener);
         }
         return connector;
     }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Thu Sep  3 03:07:05 2009
@@ -187,7 +187,7 @@
         container = new TomcatContainer(cl, new File(BASEDIR, "target/var/catalina").toString(),
null, null, null, engine, null, serverInfo, null, null);
         container.doStart();
 
-        connector = new Http11ConnectorGBean("HTTP", null, "localhost", port++, container,
serverInfo);
+        connector = new Http11ConnectorGBean("HTTP", null, "localhost", port++, container,
serverInfo,null);
         connector.doStart();
 
         TransactionManagerImpl transactionManager = new TransactionManagerImpl();

Modified: geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
(original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/filtered-resources/tomcat-base/server.xml
Thu Sep  3 03:07:05 2009
@@ -62,7 +62,8 @@
              APR (HTTP/AJP) Connector: /docs/apr.html
              Define a non-SSL HTTP/1.1 Connector on port 8080
         -->
-        <Connector port="${HTTPPort + PortOffset}"
+        <Connector name="TomcatWebConnector"
+                   port="${HTTPPort + PortOffset}"
                    host="${ServerHostname}"
                    protocol="HTTP/1.1"
                    connectionTimeout="20000"
@@ -79,7 +80,8 @@
    This connector uses the JSSE configuration, when using APR, the
    connector should be using the OpenSSL style configuration
    described in the APR documentation -->
-        <Connector port="${HTTPSPort + PortOffset}"
+        <Connector name="TomcatWebSSLConnector" 
+                   port="${HTTPSPort + PortOffset}"
                    host="${ServerHostname}"
                    protocol="HTTP/1.1"
                    SSLEnabled="true"
@@ -93,7 +95,8 @@
                    executor="DefaultThreadPool"/>
 
         <!-- Define an AJP 1.3 Connector on port 8009 -->
-        <Connector port="${AJPPort + PortOffset}"
+        <Connector name="TomcatAJPConnector"
+                   port="${AJPPort + PortOffset}"
                    host="${ServerHostname}"
                    protocol="AJP/1.3"
                    redirectPort="${HTTPSPort + PortOffset}"

Modified: geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml?rev=810767&r1=810766&r2=810767&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/tomcat6/src/main/plan/plan.xml Thu Sep  3 03:07:05
2009
@@ -30,6 +30,9 @@
     <!-- david jencks is not convinced that this gbean should be in this plan and thinks
it might
     belong in the console plan -->
     <gbean name="TomcatWebManager" class="org.apache.geronimo.tomcat.TomcatManagerImpl">
+        <reference name="Server">
+            <name>TomcatServer</name>
+        </reference>
     </gbean>
 
     <!-- The following is the equivalent of the server.xml file, but done with GBeans
-->
@@ -83,6 +86,15 @@
             <name>TomcatServer</name>
         </reference>
     </gbean>    
+    
+    <gbean name="connectorWrapperGBeanStarter" class="org.apache.geronimo.tomcat.connector.ConnectorWrapperGBeanStarter">
+        <reference name="Server">
+            <name>TomcatServer</name>
+        </reference>
+        <reference name="TomcatContainer">
+            <name>TomcatWebContainer</name>
+        </reference>
+    </gbean>
 
     <!--
     <gbean name="AprLifecycleListener" class="org.apache.geronimo.tomcat.LifecycleListenerGBean">



Mime
View raw message