geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r559901 - in /geronimo/server/trunk: assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/ configs/tomcat6/src/plan/ modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/ modules/geronimo-tomcat6/sr...
Date Thu, 26 Jul 2007 17:42:00 GMT
Author: jgenender
Date: Thu Jul 26 10:41:57 2007
New Revision: 559901

URL: http://svn.apache.org/viewvc?view=rev&rev=559901
Log:
Get Tomcat connectors to runb in container

Added:
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java
Removed:
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebConnector.java
Modified:
    geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/config.xml
    geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java

Modified: geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/config.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/config.xml?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/config.xml (original)
+++ geronimo/server/trunk/assemblies/geronimo-tomcat6-jee5/src/main/resources/var/config/config.xml Thu Jul 26 10:41:57 2007
@@ -116,17 +116,17 @@
         -->
         <gbean name="TomcatResources"/>
         <gbean name="TomcatWebConnector">
-            <attribute name="host">${ServerHostname}</attribute>
+            <attribute name="address">${ServerHostname}</attribute>
             <attribute name="port">${HTTPPortPrimary + PortOffset}</attribute>
             <attribute name="redirectPort">${HTTPSPortPrimary + PortOffset}</attribute>
         </gbean>
         <gbean name="TomcatAJPConnector">
-            <attribute name="host">${ServerHostname}</attribute>
+            <attribute name="address">${ServerHostname}</attribute>
             <attribute name="port">${AJPPortPrimary + PortOffset}</attribute>
             <attribute name="redirectPort">${HTTPSPortPrimary + PortOffset}</attribute>
         </gbean>
         <gbean name="TomcatWebSSLConnector">
-            <attribute name="host">${ServerHostname}</attribute>
+            <attribute name="address">${ServerHostname}</attribute>
             <attribute name="port">${HTTPSPortPrimary + PortOffset}</attribute>
         </gbean>
     </module>

Modified: geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml Thu Jul 26 10:41:57 2007
@@ -57,55 +57,62 @@
         </reference>
     </gbean>
 
-    <gbean name="TomcatWebConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
+    <gbean name="TomcatWebConnector" class="org.apache.geronimo.tomcat.connector.Http11ConnectorGBean">
         <attribute name="name">HTTP</attribute>
-        <attribute name="host">${PlanServerHostname}</attribute>
+        <attribute name="address">${PlanServerHostname}</attribute>
         <attribute name="port">${PlanHTTPPort}</attribute>
-        <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
+        <attribute name="maxHttpHeaderSize">8192</attribute>
         <attribute name="maxThreads">150</attribute>
         <attribute name="minSpareThreads">25</attribute>
         <attribute name="maxSpareThreads">75</attribute>
-        <attribute name="hostLookupEnabled">false</attribute>
+        <attribute name="enableLookups">false</attribute>
         <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
-        <attribute name="acceptQueueSize">100</attribute>
-        <attribute name="connectionTimeoutMillis">20000</attribute>
-        <attribute name="uploadTimeoutEnabled">false</attribute>
+        <attribute name="acceptCount">100</attribute>
+        <attribute name="connectionTimeout">20000</attribute>
+        <attribute name="disableUploadTimeout">true</attribute>
         <reference name="TomcatContainer">
             <name>TomcatWebContainer</name>
         </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
     </gbean>
 
-    <gbean name="TomcatAJPConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
-        <attribute name="protocol">AJP</attribute>
+    <gbean name="TomcatAJPConnector" class="org.apache.geronimo.tomcat.connector.AJP13ConnectorGBean">
         <attribute name="name">AJP</attribute>
-        <attribute name="host">${PlanServerHostname}</attribute>
+        <attribute name="address">${PlanServerHostname}</attribute>
         <attribute name="port">${PlanAJPPort}</attribute>
-        <attribute name="hostLookupEnabled">false</attribute>
+        <attribute name="minSpareThreads">25</attribute>
+        <attribute name="maxSpareThreads">75</attribute>
+        <attribute name="enableLookups">false</attribute>
         <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
         <reference name="TomcatContainer">
             <name>TomcatWebContainer</name>
         </reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
     </gbean>
 
     <!-- SSL support
     NOTE: If keystoreFile is a relative path, it is relative to GERONIMO_HOME
     -->
-    <gbean name="TomcatWebSSLConnector" class="org.apache.geronimo.tomcat.HttpsConnectorGBean">
+    <gbean name="TomcatWebSSLConnector" class="org.apache.geronimo.tomcat.connector.Https11ConnectorGBean">
         <attribute name="name">HTTPS</attribute>
-        <attribute name="host">${PlanServerHostname}</attribute>
+        <attribute name="address">${PlanServerHostname}</attribute>
         <attribute name="port">${PlanHTTPSPort}</attribute>
-        <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
+        <attribute name="maxHttpHeaderSize">8192</attribute>
         <attribute name="maxThreads">150</attribute>
         <attribute name="minSpareThreads">25</attribute>
         <attribute name="maxSpareThreads">75</attribute>
-        <attribute name="hostLookupEnabled">false</attribute>
-        <attribute name="acceptQueueSize">100</attribute>
-        <attribute name="uploadTimeoutEnabled">false</attribute>
-        <attribute name="clientAuthRequired">false</attribute>
+        <attribute name="enableLookups">false</attribute>
+        <attribute name="acceptCount">100</attribute>
+        <attribute name="disableUploadTimeout">false</attribute>
+        <attribute name="clientAuth">false</attribute>
         <attribute name="algorithm">Default</attribute>
-        <attribute name="secureProtocol">TLS</attribute>
-        <attribute name="keystoreFileName">var/security/keystores/geronimo-default</attribute>
-        <attribute name="keystorePassword">secret</attribute>
+        <attribute name="sslProtocol">TLS</attribute>
+        <attribute name="keystoreFile">var/security/keystores/geronimo-default</attribute>
+        <attribute name="keystorePass">secret</attribute>
         <reference name="TomcatContainer">
             <name>TomcatWebContainer</name>
         </reference>

Modified: geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java Thu Jul 26 10:41:57 2007
@@ -71,18 +71,18 @@
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.security.SecurityServiceImpl;
-import org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal;
 import org.apache.geronimo.security.credentialstore.DirectConfigurationCredentialStoreImpl;
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
+import org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.testsupport.TestSupport;
-import org.apache.geronimo.tomcat.ConnectorGBean;
 import org.apache.geronimo.tomcat.EngineGBean;
 import org.apache.geronimo.tomcat.HostGBean;
 import org.apache.geronimo.tomcat.RealmGBean;
 import org.apache.geronimo.tomcat.TomcatContainer;
+import org.apache.geronimo.tomcat.connector.Http11ConnectorGBean;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManagerGBean;
 
 /**
@@ -301,10 +301,11 @@
         containerData.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
         AbstractName containerName = containerData.getAbstractName();
 
-        GBeanData connector = bootstrap.addGBean("TomcatConnector", ConnectorGBean.GBEAN_INFO);
+        GBeanData connector = bootstrap.addGBean("TomcatConnector", Http11ConnectorGBean.GBEAN_INFO);
         connector.setAttribute("name", "HTTP");
         connector.setAttribute("port", new Integer(8181));
         connector.setReferencePattern("TomcatContainer", containerName);
+        connector.setReferencePattern("ServerInfo", serverInfo.getAbstractName());
 
         GBeanData tm = bootstrap.addGBean("TransactionManager", GeronimoTransactionManagerGBean.GBEAN_INFO);
         tmName = tm.getAbstractName();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java Thu Jul 26 10:41:57 2007
@@ -20,6 +20,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
@@ -41,6 +42,12 @@
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.tomcat.connector.AJP13ConnectorGBean;
+import org.apache.geronimo.tomcat.connector.CommonProtocol;
+import org.apache.geronimo.tomcat.connector.ConnectorGBean;
+import org.apache.geronimo.tomcat.connector.Http11ConnectorGBean;
+import org.apache.geronimo.tomcat.connector.Https11ConnectorGBean;
+import org.apache.geronimo.tomcat.connector.TomcatWebConnector;
 
 /**
  * Tomcat implementation of the WebManager management API.  Knows how to
@@ -75,25 +82,29 @@
     public WebConnector addConnector(WebContainer container, String uniqueName, String protocol, String host, int port) {
         AbstractName containerName = kernel.getAbstractNameFor(container);
         AbstractName name = kernel.getNaming().createSiblingName(containerName, uniqueName, NameFactory.GERONIMO_SERVICE);
+        //Get the server info
+        AbstractNameQuery query = new AbstractNameQuery(ServerInfo.class.getName());
+        Set set = kernel.listGBeans(query);
+        AbstractName serverInfo = (AbstractName)set.iterator().next();
         GBeanData connector;
         if(protocol.equals(PROTOCOL_HTTP)) {
-            connector = new GBeanData(name, ConnectorGBean.GBEAN_INFO);
+            connector = new GBeanData(name, Http11ConnectorGBean.GBEAN_INFO);
+            connector.setReferencePattern("ServerInfo", serverInfo);
         } else if(protocol.equals(PROTOCOL_HTTPS)) {
-            connector = new GBeanData(name, HttpsConnectorGBean.GBEAN_INFO);
-            AbstractNameQuery query = new AbstractNameQuery(ServerInfo.class.getName());
-            Set set = kernel.listGBeans(query);
-            connector.setReferencePattern("ServerInfo", (AbstractName)set.iterator().next());
+            connector = new GBeanData(name, Https11ConnectorGBean.GBEAN_INFO);
+            connector.setReferencePattern("ServerInfo", serverInfo);
             //todo: default HTTPS settings
         } else if(protocol.equals(PROTOCOL_AJP)) {
-            connector = new GBeanData(name, ConnectorGBean.GBEAN_INFO);
+            connector = new GBeanData(name, AJP13ConnectorGBean.GBEAN_INFO);
+            connector.setReferencePattern("ServerInfo", serverInfo);
         } else {
             throw new IllegalArgumentException("Invalid protocol '"+protocol+"'");
         }
-        connector.setAttribute("protocol", protocol);
+//        connector.setAttribute("protocol", protocol);
         connector.setAttribute("host", host);
         connector.setAttribute("port", new Integer(port));
         connector.setAttribute("maxThreads", new Integer(50));
-        connector.setAttribute("acceptQueueSize", new Integer(100));
+        connector.setAttribute("acceptCount", new Integer(100));
         connector.setReferencePattern(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE, containerName);
         connector.setAttribute("name", uniqueName);
         EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel);

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java Thu Jul 26 10:41:57 2007
@@ -65,6 +65,7 @@
 import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
 import org.apache.geronimo.security.jacc.RunAsSource;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
+import org.apache.geronimo.tomcat.connector.TomcatWebConnector;
 import org.apache.geronimo.tomcat.stats.ModuleStats;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.GeronimoUserTransaction;
@@ -390,10 +391,19 @@
     }
 
     public URL getURLFor() {
-        WebConnector[] connectors = (WebConnector[]) container.getConnectors();
+        //BAD BAD BAD! This is a nasty hack.  The web application should NOT know its connection url since
+        //connector != web application.  This should be changed to only return a String context and not a URL
+        try {
+            return new URL("http://localhost" + getContextPath());
+        } catch (MalformedURLException e) {
+            log.error("Bad URL to connect to web app", e);
+            return null;
+        }
+        /**
+        TomcatWebConnector[] connectors = (TomcatWebConnector[]) container.getConnectors();
         Map map = new HashMap();
         for (int i = 0; i < connectors.length; i++) {
-            WebConnector connector = connectors[i];
+            TomcatWebConnector connector = connectors[i];
             map.put(connector.getProtocol(), connector.getConnectUrl());
         }
         String urlPrefix;
@@ -411,6 +421,7 @@
             log.error("Bad URL to connect to web app", e);
             return null;
         }
+        **/
     }
 
     public String getContextPath() {

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/AJP13ConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -19,12 +19,15 @@
 package org.apache.geronimo.tomcat.connector;
 
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 import java.util.Map;
 
 import javax.management.j2ee.statistics.Stats;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 import org.apache.geronimo.tomcat.stats.ConnectorStats;
@@ -36,6 +39,7 @@
 
     private boolean reset = true;
 
+    protected String connectHost;
 
     public AJP13ConnectorGBean(String name, Map initParams, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
         super(name, initParams, "AJP/1.3", container, serverInfo);
@@ -54,7 +58,46 @@
         connector.setAttribute("port", port);
 
     }
-
+    
+    public String getGeronimoProtocol(){
+        return WebManager.PROTOCOL_AJP;
+    }
+    
+    public String getConnectUrl() {
+        if(connectHost == null) {
+            String host = getAddress();
+            if(host == null || host.equals("0.0.0.0") || host.equals("0:0:0:0:0:0:0:1")) {
+                InetAddress address = null;
+                try {
+                    address = InetAddress.getLocalHost();
+                } catch (UnknownHostException e) {
+                    host = "unknown-host";
+                }
+                if(address != null) {
+                    host = address.getCanonicalHostName();
+                    if(host == null || host.equals("")) {
+                        host = address.getHostAddress();
+                    }
+                }
+            }
+            // this host address could be in IPv6 format, 
+            // which means we need to wrap it in brackets
+            if (host.indexOf(":") >= 0) {
+                host = "[" + host + "]"; 
+            }
+            connectHost = host;
+        }
+        return getScheme().toLowerCase()+"://"+connectHost+(getPort() == getDefaultPort() ? "" : ":"+getPort());
+    }
+    
+    public int getDefaultPort() {
+        return -1; 
+    }  
+    
+    public InetSocketAddress getListenAddress() {
+        return new InetSocketAddress(getHost(), getPort());
+    }
+    
     public String getAddress() {
         Object value = connector.getAttribute("address");
         if (value == null) {
@@ -83,6 +126,10 @@
     public String getExecutor() {
         return (String) connector.getAttribute("Executor");
     }
+    
+    public String getHost() {
+        return getAddress();
+    }
 
     public int getKeepAliveTimeout() {
         Object value = connector.getAttribute("keepAliveTimeout");
@@ -93,7 +140,17 @@
         Object value = connector.getAttribute("maxThreads");
         return value == null ? 200 : Integer.parseInt(value.toString());
     }
-
+    
+    public int getMaxSpareThreads() {
+        Object value = connector.getAttribute("maxSpareThreads");
+        return value == null ? 100 : Integer.parseInt(value.toString());
+    }
+    
+    public int getMinSpareThreads() {
+        Object value = connector.getAttribute("minSpareThreads");
+        return value == null ? 10 : Integer.parseInt(value.toString());
+    }
+    
     public int getPort() {
         return connector.getPort();
     }
@@ -127,6 +184,10 @@
     public void setExecutor(String executor) {
         connector.setAttribute("executor", executor);
     }
+    
+    public void setHost(String host) {
+        setAddress(host);
+    }
 
     public void setKeepAliveTimeout(int keepAliveTimeout) {
         connector.setAttribute("keepAliveTimeout", keepAliveTimeout);        
@@ -135,6 +196,18 @@
     public void setMaxThreads(int maxThreads) {
         connector.setAttribute("maxThreads", maxThreads);        
     }
+    
+    public void setMaxSpareThreads(int maxSpareThreads) {
+        connector.setAttribute("maxSpareThreads", new Integer(maxSpareThreads));
+    }
+    
+    public void setMinSpareThreads(int minSpareThreads) {
+        connector.setAttribute("minSpareThreads", new Integer(minSpareThreads));
+    }
+
+    public void setNoCompressionUserAgents(String noCompressionUserAgents) {
+        connector.setAttribute("noCompressionUserAgents", noCompressionUserAgents);
+    }
 
     public void setPort(int port) {
         connector.setPort(port);
@@ -167,7 +240,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Tomcat Connector", AJP13ConnectorGBean.class, ConnectorGBean.GBEAN_INFO);
-        infoFactory.addInterface(Http11Protocol.class, 
+        infoFactory.addInterface(Ajp13Protocol.class, 
                 new String[] {
                     //AJP Attributes
                     "address", 
@@ -176,6 +249,9 @@
                     "connectionTimeout", 
                     "executor", 
                     "keepAliveTimeout", 
+                    "maxThreads",
+                    "maxSpareThreads",
+                    "minSpareThreads",
                     "port", 
                     "tcpNoDelay", 
                     "tomcatAuthentication", 
@@ -188,6 +264,9 @@
                     "connectionTimeout", 
                     "executor", 
                     "keepAliveTimeout", 
+                    "maxThreads",
+                    "maxSpareThreads",
+                    "minSpareThreads",
                     "port", 
                     "tcpNoDelay", 
                     "tomcatAuthentication", 

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Ajp13Protocol.java Thu Jul 26 10:41:57 2007
@@ -34,6 +34,10 @@
     public void setKeepAliveTimeout(int keepAliveTimeout);
     public int getMaxThreads();
     public void setMaxThreads(int maxThreads);
+    public int getMaxSpareThreads();
+    public void setMaxSpareThreads(int maxSpareThreads);
+    public int getMinSpareThreads();
+    public void setMinSpareThreads(int minSpareThreads);
     public int getPort();
     public void setPort(int port);
     public boolean getTcpNoDelay();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11ConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -19,6 +19,8 @@
 package org.apache.geronimo.tomcat.connector;
 
 import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
 import java.util.Map;
 
 import javax.management.j2ee.statistics.Stats;
@@ -31,7 +33,7 @@
 import org.apache.geronimo.tomcat.TomcatContainer;
 import org.apache.geronimo.tomcat.stats.ConnectorStats;
 
-public class BaseHttp11ConnectorGBean extends ConnectorGBean implements Http11Protocol, StatisticsProvider {
+public abstract class BaseHttp11ConnectorGBean extends ConnectorGBean implements Http11Protocol, StatisticsProvider {
 
     private String keystoreFileName;
 
@@ -39,13 +41,15 @@
 
     private String algorithm;
 
+    protected String connectHost;
+    
     // JSR77 stats
     private ConnectorStats connStatsProvider = new ConnectorStats();
 
     private boolean reset = true;
 
-    public BaseHttp11ConnectorGBean(String name, Map initParams, String protocol, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
-        super(name, initParams, protocol, container, serverInfo);
+    public BaseHttp11ConnectorGBean(String name, Map initParams, String tomcatProtocol, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+        super(name, initParams, tomcatProtocol, container, serverInfo);
 
         // Default the host to listen on all address is one was not specified
         if (address == null) {
@@ -58,10 +62,40 @@
         }
 
         connector.setAttribute("address", address);
-        connector.setAttribute("port", port);
+        connector.setPort(port);
 
     }
+    
     protected void initProtocol() {}
+    
+    public String getConnectUrl() {
+        if(connectHost == null) {
+            String host = getAddress();
+            if(host == null || host.equals("0.0.0.0") || host.equals("0:0:0:0:0:0:0:1")) {
+                InetAddress address = null;
+                try {
+                    address = InetAddress.getLocalHost();
+                } catch (UnknownHostException e) {
+                    host = "unknown-host";
+                }
+                if(address != null) {
+                    host = address.getCanonicalHostName();
+                    if(host == null || host.equals("")) {
+                        host = address.getHostAddress();
+                    }
+                }
+            }
+            // this host address could be in IPv6 format, 
+            // which means we need to wrap it in brackets
+            if (host.indexOf(":") >= 0) {
+                host = "[" + host + "]"; 
+            }
+            connectHost = host;
+        }
+        return getScheme().toLowerCase()+"://"+connectHost+(getPort() == getDefaultPort() ? "" : ":"+getPort());
+    }
+    
+    public abstract int getDefaultPort();
 
     // Generic SSL
     public String getAlgorithm() {
@@ -113,7 +147,7 @@
         connector.setAttribute("ciphers", ciphers);
     }
 
-    public void setClientAuth(String clientAuth) {
+    public void setClientAuth(boolean clientAuth) {
         connector.setAttribute("clientAuth", new Boolean(clientAuth));
     }
 
@@ -198,6 +232,14 @@
     public String getExecutor() {
         return (String) connector.getAttribute("Executor");
     }
+    
+    public String getHost() {
+        return getAddress();
+    }
+    
+    public InetSocketAddress getListenAddress() {
+        return new InetSocketAddress(getHost(), getPort());
+    }
 
     public int getKeepAliveTimeout() {
         Object value = connector.getAttribute("keepAliveTimeout");
@@ -218,6 +260,16 @@
         Object value = connector.getAttribute("maxThreads");
         return value == null ? 200 : Integer.parseInt(value.toString());
     }
+    
+    public int getMaxSpareThreads() {
+        Object value = connector.getAttribute("maxSpareThreads");
+        return value == null ? 100 : Integer.parseInt(value.toString());
+    }
+    
+    public int getMinSpareThreads() {
+        Object value = connector.getAttribute("minSpareThreads");
+        return value == null ? 10 : Integer.parseInt(value.toString());
+    }
 
     public String getNoCompressionUserAgents() {
         return (String) connector.getAttribute("noCompressionUserAgents");
@@ -262,7 +314,7 @@
         connector.setAttribute("bufferSize", new Integer(bufferSize));
     }
 
-    public void setCompressableMimeType(int compressableMimeType) {
+    public void setCompressableMimeType(String compressableMimeType) {
         connector.setAttribute("compressableMimeType", compressableMimeType);
     }
 
@@ -285,6 +337,10 @@
     public void setExecutor(String executor) {
         connector.setAttribute("executor", executor);
     }
+    
+    public void setHost(String host) {
+        setAddress(host);
+    }
 
     public void setKeepAliveTimeout(int keepAliveTimeout) {
         connector.setAttribute("keepAliveTimeout", keepAliveTimeout);
@@ -301,6 +357,14 @@
     public void setMaxThreads(int maxThreads) {
         connector.setAttribute("maxThreads", new Integer(maxThreads));
     }
+    
+    public void setMaxSpareThreads(int maxSpareThreads) {
+        connector.setAttribute("maxSpareThreads", new Integer(maxSpareThreads));
+    }
+    
+    public void setMinSpareThreads(int minSpareThreads) {
+        connector.setAttribute("minSpareThreads", new Integer(minSpareThreads));
+    }
 
     public void setNoCompressionUserAgents(String noCompressionUserAgents) {
         connector.setAttribute("noCompressionUserAgents", noCompressionUserAgents);
@@ -360,11 +424,14 @@
                     "connectionLinger", 
                     "connectionTimeout", 
                     "executor", 
+                    "host",
                     "keepAliveTimeout", 
                     "disableUploadTimeout", 
                     "maxHttpHeaderSize", 
                     "maxKeepAliveRequests", 
                     "maxThreads", 
+                    "maxSpareThreads",
+                    "minSpareThreads",
                     "noCompressionUserAgents", 
                     "port", 
                     "restrictedUserAgents", 
@@ -395,11 +462,14 @@
                     "connectionLinger", 
                     "connectionTimeout", 
                     "executor", 
+                    "host",
                     "keepAliveTimeout", 
                     "disableUploadTimeout", 
                     "maxHttpHeaderSize", 
                     "maxKeepAliveRequests", 
                     "maxThreads", 
+                    "maxSpareThreads",
+                    "minSpareThreads",
                     "noCompressionUserAgents", 
                     "port", 
                     "restrictedUserAgents", 

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/BaseHttp11Protocol.java Thu Jul 26 10:41:57 2007
@@ -27,7 +27,7 @@
     public int getBufferSize();
     public void setBufferSize(int bufferSize);
     public String getCompressableMimeType();
-    public void setCompressableMimeType(int compressableMimeType);
+    public void setCompressableMimeType(String compressableMimeType);
     public String getCompression();
     public void setCompression(String compression);
     public int getConnectionLinger();
@@ -36,6 +36,8 @@
     public void setConnectionTimeout(int connectionTimeout);
     public String getExecutor();
     public void setExecutor(String executor);
+    public String getHost();
+    public void setHost(String host);
     public int getKeepAliveTimeout();
     public void setKeepAliveTimeout(int keepAliveTimeout);
     public boolean getDisableUploadTimeout();
@@ -46,6 +48,10 @@
     public void setMaxKeepAliveRequests(int maxKeepAliveRequests);
     public int getMaxThreads();
     public void setMaxThreads(int maxThreads);
+    public int getMaxSpareThreads();
+    public void setMaxSpareThreads(int maxSpareThreads);
+    public int getMinSpareThreads();
+    public void setMinSpareThreads(int minSpareThreads);
     public String getNoCompressionUserAgents();
     public void setNoCompressionUserAgents(String noCompressionUserAgents);
     public int getPort();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/CommonProtocol.java Thu Jul 26 10:41:57 2007
@@ -30,6 +30,7 @@
     public int getMaxSavePostSize();
     public void setMaxSavePostSize(int maxPostSize);
     public String getProtocol();
+    public String getTomcatProtocol();
     public String getProxyName();
     public void setProxyName(String proxyName);
     public int getProxyPort();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/ConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -21,6 +21,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.management.j2ee.statistics.Stats;
+
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.connector.Connector;
 import org.apache.commons.logging.Log;
@@ -29,13 +31,13 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.BaseGBean;
 import org.apache.geronimo.tomcat.ObjectRetriever;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
-public class ConnectorGBean extends BaseGBean implements GBeanLifecycle, ObjectRetriever, CommonProtocol {
+public abstract class ConnectorGBean extends BaseGBean implements GBeanLifecycle, ObjectRetriever, TomcatWebConnector {
 
     private static final Log log = LogFactory.getLog(ConnectorGBean.class);
 
@@ -49,7 +51,7 @@
 
     private String name;
 
-    public ConnectorGBean(String name, Map initParams, String protocol, TomcatContainer container, ServerInfo serverInfo) throws Exception {
+    public ConnectorGBean(String name, Map initParams, String tomcatProtocol, TomcatContainer container, ServerInfo serverInfo) throws Exception {
         
         //Relief for new Tomcat-only parameters that may come in the future
         if (initParams == null){
@@ -78,7 +80,7 @@
         this.serverInfo = serverInfo;
 
         // Create the Connector object
-        connector = new Connector(protocol);
+        connector = new Connector(tomcatProtocol);
         
         setParameters(connector, initParams);
 
@@ -115,6 +117,14 @@
      */
     protected void initProtocol() {}
     
+    public abstract int getDefaultPort();
+    
+    public abstract String getGeronimoProtocol();
+    
+    public abstract Stats getStats();
+    
+    public abstract void resetStats();
+    
     public Object getInternalObject() {
         return connector;
     }
@@ -149,6 +159,13 @@
     }
 
     public String getProtocol() {
+        //This is totally wrong on the Geronimo side and needs to be re-thought out.
+        //This was done to shoe horn in gerneric Geronimo protocols which should have no relation
+        //to the container's scheme.  This whole idea needs rework.
+        return getGeronimoProtocol();
+    }
+    
+    public String getTomcatProtocol() {
         return connector.getProtocol();
     }
 
@@ -261,6 +278,7 @@
         infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
         infoFactory.addInterface(ObjectRetriever.class);
+        infoFactory.addInterface(TomcatWebConnector.class);
         infoFactory.addInterface(CommonProtocol.class,
                 
                 new String[]{
@@ -270,6 +288,7 @@
                         "maxPostSize",
                         "maxSavePostSize",
                         "protocol",
+                        "tomcatProtocol",
                         "proxyName",
                         "proxyPort",
                         "redirectPort",
@@ -289,6 +308,7 @@
                         "maxPostSize",
                         "maxSavePostSize",
                         "protocol",
+                        "tomcatProtocol",
                         "proxyName",
                         "proxyPort",
                         "redirectPort",

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11ConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -22,6 +22,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
@@ -31,6 +32,14 @@
         super(name, initParams, "HTTP/1.1", address, port, container, serverInfo);
     }
 
+    public int getDefaultPort() {
+        return 80; 
+    }  
+    
+    public String getGeronimoProtocol(){
+        return WebManager.PROTOCOL_HTTP;
+    }
+    
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11NIOConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -22,6 +22,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
@@ -29,6 +30,14 @@
 
     public Http11NIOConnectorGBean(String name,  Map initParams, String address, int port, TomcatContainer container, ServerInfo serverInfo) throws Exception {
         super(name, initParams, "org.apache.coyote.http11.Http11NioProtocol", address, port, container, serverInfo);
+    }
+    
+    public int getDefaultPort() {
+        return 80; 
+    }  
+    
+    public String getGeronimoProtocol(){
+        return WebManager.PROTOCOL_HTTP;
     }
 
     public int getAcceptorThreadCount() {

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Http11Protocol.java Thu Jul 26 10:41:57 2007
@@ -24,7 +24,7 @@
     public String getAlgorithm();
     public void setAlgorithm(String algorithm);
     public boolean getClientAuth();
-    public void setClientAuth(String clientAuth);
+    public void setClientAuth(boolean clientAuth);
     public String getKeystoreFile();
     public void setKeystoreFile(String keystoreFile);
     public void setKeystorePass(String keystorePass);

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11ConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -22,6 +22,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
@@ -32,6 +33,14 @@
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
+    }
+    
+    public int getDefaultPort() {
+        return 443; 
+    }  
+    
+    public String getGeronimoProtocol(){
+        return WebManager.PROTOCOL_HTTPS;
     }
     
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/Https11NIOConnectorGBean.java Thu Jul 26 10:41:57 2007
@@ -22,6 +22,7 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.tomcat.TomcatContainer;
 
@@ -32,6 +33,14 @@
         setSslEnabled(true);
         setScheme("https");
         setSecure(true);
+    }
+    
+    public int getDefaultPort() {
+        return 443; 
+    }  
+    
+    public String getGeronimoProtocol(){
+        return WebManager.PROTOCOL_HTTPS;
     }
     
     public static final GBeanInfo GBEAN_INFO;

Added: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java?view=auto&rev=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java (added)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/connector/TomcatWebConnector.java Thu Jul 26 10:41:57 2007
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.tomcat.connector;
+
+import org.apache.geronimo.management.geronimo.NetworkConnector;
+
+public interface TomcatWebConnector extends NetworkConnector {
+
+    public String getConnectUrl();
+
+}

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java Thu Jul 26 10:41:57 2007
@@ -44,6 +44,8 @@
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.testsupport.TestSupport;
+import org.apache.geronimo.tomcat.connector.ConnectorGBean;
+import org.apache.geronimo.tomcat.connector.Http11ConnectorGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
 
@@ -180,7 +182,7 @@
         container = new TomcatContainer(cl, new File(BASEDIR, "target/var/catalina").toString(), null, engine, null, serverInfo, null, null);
         container.doStart();
 
-        connector = new ConnectorGBean("HTTP", null, "localhost", port++, container);
+        connector = new Http11ConnectorGBean("HTTP", null, "localhost", port++, container, serverInfo);
         connector.doStart();
 
         TransactionManagerImpl transactionManager = new TransactionManagerImpl();

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java?view=diff&rev=559901&r1=559900&r2=559901
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java (original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/StatTest.java Thu Jul 26 10:41:57 2007
@@ -37,7 +37,6 @@
         TomcatWebAppContext webModule;
         webModule = setUpInsecureAppContext(new File(BASEDIR, "target/var/catalina/webapps/war1/").toURI(), new File(
                 BASEDIR, "target/var/catalina/webapps/war1/WEB-INF/web.xml").toURL(), null, null, null, null);
-
             HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + "/test/hello.txt")
                     .openConnection();
             BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));



Mime
View raw message