From scm-return-20957-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Thu Aug 02 05:51:53 2007 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 53607 invoked from network); 2 Aug 2007 05:51:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2007 05:51:52 -0000 Received: (qmail 75308 invoked by uid 500); 2 Aug 2007 05:51:52 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 75269 invoked by uid 500); 2 Aug 2007 05:51:52 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 75258 invoked by uid 99); 2 Aug 2007 05:51:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2007 22:51:52 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 05:51:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DD541A981D; Wed, 1 Aug 2007 22:51:23 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562021 [2/4] - in /geronimo/server/branches/2.0: applications/console/geronimo-console-framework/src/main/webapp/js/ applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ applications/console/geronimo-co... Date: Thu, 02 Aug 2007 05:51:21 -0000 To: scm@geronimo.apache.org From: pmcmahan@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070802055123.7DD541A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Copied: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp (from r561149, geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp) URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp?view=diff&rev=562021&p1=geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp&r1=561149&p2=geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp&r2=562021 ============================================================================== --- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp (original) +++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp Wed Aug 1 22:51:18 2007 @@ -26,16 +26,16 @@ var attributeName; var element; - element = document.forms['Form'].elements['displayName']; + element = document.forms['Form'].elements['uniqueName']; if(element.value.length < 1){ - alert("displayName must not be empty."); + alert("uniqueName must not be empty."); return false; } attributeName = '${connectorAttribute.attributeName}'; element = document.forms['Form'].elements[attributeName]; - + //validate the required attribute has a value if(element.value.length < 1){ alert(attributeName + " must not be empty."); @@ -69,7 +69,7 @@ Add a new ${connectorType} - Edit connector ${displayName} + Edit connector ${uniqueName}

@@ -82,21 +82,23 @@ Description - *displayName + *uniqueName String - + - + + - A unique name for this connector + A name that is different than the name for any other web connectors in the server (no spaces in the name please) + * @@ -105,14 +107,33 @@ ${connectorAttribute.attributeClass.simpleName} + + + + + "> - + checked> - + "> Propchange: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision HeadURL Propchange: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/editConnector.jsp ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp (original) +++ geronimo/server/branches/2.0/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/webmanager/connector/normal.jsp Wed Aug 1 22:51:18 2007 @@ -48,7 +48,7 @@ - ${info.displayName} + ${info.uniqueName} ${info.protocol} ${info.port} ${info.stateName} @@ -61,7 +61,7 @@ " - onClick="return confirm('Console application will not be available if ${info.displayName} is stopped. Stop ${info.displayName}?');"> + onClick="return confirm('Console application will not be available if ${info.uniqueName} is stopped. Stop ${info.uniqueName}?');"> stop @@ -84,7 +84,7 @@ - " onClick="return confirm('Are you sure you want to delete ${info.displayName}?');">delete + " onClick="return confirm('Are you sure you want to delete ${info.uniqueName}?');">delete ${info.description} @@ -93,18 +93,19 @@ - +


- -
- +Add new: +

Modified: geronimo/server/branches/2.0/configs/geronimo-gbean-deployer/src/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/configs/geronimo-gbean-deployer/src/plan/plan.xml?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/configs/geronimo-gbean-deployer/src/plan/plan.xml (original) +++ geronimo/server/branches/2.0/configs/geronimo-gbean-deployer/src/plan/plan.xml Wed Aug 1 22:51:18 2007 @@ -20,6 +20,7 @@ + localhost:8080 Modified: geronimo/server/branches/2.0/configs/j2ee-server/src/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/configs/j2ee-server/src/plan/plan.xml?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/configs/j2ee-server/src/plan/plan.xml (original) +++ geronimo/server/branches/2.0/configs/j2ee-server/src/plan/plan.xml Wed Aug 1 22:51:18 2007 @@ -91,10 +91,8 @@ javax.xml.soap.SOAPFactory=org.apache.geronimo.webservices.saaj.GeronimoSOAPFactory javax.xml.soap.SOAPConnectionFactory=org.apache.geronimo.webservices.saaj.GeronimoSOAPConnectionFactory javax.xml.soap.MetaFactory=org.apache.geronimo.webservices.saaj.GeronimoMetaFactory - org.apache.cxf.jaxws.checkPublishEndpointPermission=true - - + java.net.preferIPv4Stack=true Modified: geronimo/server/branches/2.0/configs/tomcat6/src/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/configs/tomcat6/src/plan/plan.xml?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/configs/tomcat6/src/plan/plan.xml (original) +++ geronimo/server/branches/2.0/configs/tomcat6/src/plan/plan.xml Wed Aug 1 22:51:18 2007 @@ -57,55 +57,62 @@ - + HTTP ${PlanServerHostname} ${PlanHTTPPort} - 8192 + 8192 150 25 75 - false + false ${PlanHTTPSPort} - 100 - 20000 - false + 100 + 20000 + true TomcatWebContainer + + ServerInfo + - - AJP + AJP ${PlanServerHostname} ${PlanAJPPort} - false + 25 + 75 + false ${PlanHTTPSPort} TomcatWebContainer + + ServerInfo + - + HTTPS ${PlanServerHostname} ${PlanHTTPSPort} - 8192 + 8192 150 25 75 - false - 100 - false - false + false + 100 + false + false Default - TLS - var/security/keystores/geronimo-default - secret + TLS + var/security/keystores/geronimo-default + secret TomcatWebContainer Modified: geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java Wed Aug 1 22:51:18 2007 @@ -174,7 +174,7 @@ } } } - CommandSupport.addWebURLs(kernel, result); + CommandSupport.addWebContextPaths(kernel, result); return result.size() == 0 ? null : result.toArray(new TargetModuleID[result.size()]); } catch (Exception e) { throw (TargetException) new TargetException(e.getMessage()).initCause(e); Modified: geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Wed Aug 1 22:51:18 2007 @@ -274,14 +274,14 @@ } protected void addWebURLs(Kernel kernel) throws Exception{ - addWebURLs(kernel, moduleIDs); + addWebContextPaths(kernel, moduleIDs); } /** * Given a list of TargetModuleIDs, figure out which ones represent web * modules and add a WebURL to each if possible. */ - public static void addWebURLs(Kernel kernel, List moduleIDs) throws Exception{ + public static void addWebContextPaths(Kernel kernel, List moduleIDs) throws Exception{ Set webApps = null; for (int i = 0; i < moduleIDs.size(); i++) { TargetModuleIDImpl id = (TargetModuleIDImpl) moduleIDs.get(i); @@ -292,12 +292,12 @@ for (Iterator it = webApps.iterator(); it.hasNext();) { AbstractName name = (AbstractName) it.next(); if(name.getName().get("name").equals(id.getModuleID())) { - id.setWebURL(kernel.getAttribute(name, "URLFor").toString()); + id.setWebURL(kernel.getAttribute(name, "contextPath").toString()); } } } if(id.getChildTargetModuleID() != null) { - addWebURLs(kernel, Arrays.asList(id.getChildTargetModuleID())); + addWebContextPaths(kernel, Arrays.asList(id.getChildTargetModuleID())); } } } Modified: geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java Wed Aug 1 22:51:18 2007 @@ -67,14 +67,15 @@ private final int REAPER_INTERVAL = 60 * 1000; private final Properties pendingDeletionIndex = new Properties(); private DeployerReaper reaper; + private final String remoteDeployAddress; private final Collection builders; private final Collection stores; private final Collection watchers; private final ArtifactResolver artifactResolver; private final Kernel kernel; - public Deployer(Collection builders, Collection stores, Collection watchers, Kernel kernel) { - this(builders, stores, watchers, getArtifactResolver(kernel), kernel); + public Deployer(String remoteDeployAddress, Collection builders, Collection stores, Collection watchers, Kernel kernel) { + this(remoteDeployAddress, builders, stores, watchers, getArtifactResolver(kernel), kernel); } private static ArtifactResolver getArtifactResolver(Kernel kernel) { @@ -82,7 +83,8 @@ return configurationManager.getArtifactResolver(); } - public Deployer(Collection builders, Collection stores, Collection watchers, ArtifactResolver artifactResolver, Kernel kernel) { + public Deployer(String remoteDeployAddress, Collection builders, Collection stores, Collection watchers, ArtifactResolver artifactResolver, Kernel kernel) { + this.remoteDeployAddress = remoteDeployAddress; this.builders = builders; this.stores = stores; this.watchers = watchers; @@ -177,7 +179,7 @@ return null; } AbstractName module = (AbstractName) names.iterator().next(); - return kernel.getAttribute(module, "URLFor") + "/upload"; + return remoteDeployAddress + "/" + kernel.getAttribute(module, "contextPath") + "/upload"; } catch (Exception e) { log.error("Unable to look up remote deploy upload URL", e); return null; @@ -473,6 +475,7 @@ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Deployer.class, DEPLOYER); infoFactory.addAttribute("kernel", Kernel.class, false); + infoFactory.addAttribute("remoteDeployAddress", String.class, true, true); infoFactory.addAttribute("remoteDeployUploadURL", String.class, false); infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class}); infoFactory.addOperation("deploy", new Class[]{boolean.class, File.class, File.class, String.class}); @@ -482,7 +485,7 @@ infoFactory.addReference("Store", ConfigurationStore.class, "ConfigurationStore"); infoFactory.addReference("Watchers", DeploymentWatcher.class); - infoFactory.setConstructor(new String[]{"Builders", "Store", "Watchers", "kernel"}); + infoFactory.setConstructor(new String[]{"remoteDeployAddress", "Builders", "Store", "Watchers", "kernel"}); GBEAN_INFO = infoFactory.getBeanInfo(); } Modified: geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyManagerImpl.java Wed Aug 1 22:51:18 2007 @@ -17,9 +17,13 @@ package org.apache.geronimo.jetty6; import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Set; +import java.util.Map.Entry; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -31,8 +35,11 @@ import org.apache.geronimo.gbean.ReferencePatterns; import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; import org.apache.geronimo.jetty6.connector.AJP13Connector; -import org.apache.geronimo.jetty6.connector.HTTPSocketConnector; +import org.apache.geronimo.jetty6.connector.HTTPBlockingConnector; +import org.apache.geronimo.jetty6.connector.HTTPSSelectChannelConnector; import org.apache.geronimo.jetty6.connector.HTTPSSocketConnector; +import org.apache.geronimo.jetty6.connector.HTTPSelectChannelConnector; +import org.apache.geronimo.jetty6.connector.HTTPSocketConnector; import org.apache.geronimo.jetty6.connector.JettyConnector; import org.apache.geronimo.jetty6.requestlog.JettyLogManager; import org.apache.geronimo.kernel.GBeanNotFoundException; @@ -56,6 +63,125 @@ */ public class JettyManagerImpl implements WebManager { private final static Log log = LogFactory.getLog(JettyManagerImpl.class); + + private static final ConnectorType HTTP_NIO = new ConnectorType("Jetty NIO HTTP Connector"); + private static final ConnectorType HTTPS_NIO = new ConnectorType("Jetty NIO HTTPS Connector"); + private static final ConnectorType HTTP_BLOCKING_NIO = new ConnectorType("Jetty Blocking HTTP Connector using NIO"); + private static final ConnectorType HTTP_BIO = new ConnectorType("Jetty BIO HTTP Connector"); + private static final ConnectorType HTTPS_BIO = new ConnectorType("Jetty BIO HTTPS Connector"); + private static final ConnectorType AJP_NIO = new ConnectorType("Jetty NIO AJP Connector"); + private static List CONNECTOR_TYPES = Arrays.asList( + HTTP_NIO, + HTTPS_NIO, + HTTP_BLOCKING_NIO, + HTTP_BIO, + HTTPS_BIO, + AJP_NIO + ); + + private static Map> CONNECTOR_ATTRIBUTES = new HashMap>(); + + //"host", "port", "minThreads", "maxThreads", "bufferSizeBytes", "acceptQueueSize", "lingerMillis", "protocol", "redirectPort", "connectUrl", "maxIdleTimeMs" + static { + List connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8080, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + CONNECTOR_ATTRIBUTES.put(HTTP_NIO, connectorAttributes); + + connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8443, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("clientAuthRequested", false, "clientAuthRequested", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("clientAuthRequired", false, "If set, then clients connecting through this connector must supply a valid client certificate.", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("keyStore", "", "The keystore to use for accessing the server's private key", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("trustStore", "", "The keystore containing the trusted certificate entries, including Certification Authority (CA) certificates", String.class)); + //connectorAttributes.add(new ConnectorAttribute("keyAlias", "", "keyAlias", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("secureProtocol", "", "This should normally be set to TLS, though some (IBM) JVMs don't work properly with popular browsers unless it is changed to SSL.", String.class)); + connectorAttributes.add(new ConnectorAttribute("algorithm", "Default", "This should normally be set to match the JVM vendor.", String.class)); + CONNECTOR_ATTRIBUTES.put(HTTPS_NIO, connectorAttributes); + + connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8080, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + CONNECTOR_ATTRIBUTES.put(HTTP_BIO, connectorAttributes); + + connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8443, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("clientAuthRequested", false, "clientAuthRequested", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("clientAuthRequired", false, "If set, then clients connecting through this connector must supply a valid client certificate.", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("keyStore", "", "The keystore to use for accessing the server's private key", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("trustStore", "", "The keystore containing the trusted certificate entries, including Certification Authority (CA) certificates", String.class)); + //connectorAttributes.add(new ConnectorAttribute("keyAlias", "", "keyAlias", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("secureProtocol", "", "This should normally be set to TLS, though some (IBM) JVMs don't work properly with popular browsers unless it is changed to SSL.", String.class)); + connectorAttributes.add(new ConnectorAttribute("algorithm", "Default", "This should normally be set to match the JVM vendor.", String.class)); + CONNECTOR_ATTRIBUTES.put(HTTPS_BIO, connectorAttributes); + + connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8080, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + CONNECTOR_ATTRIBUTES.put(HTTP_BLOCKING_NIO, connectorAttributes); + + connectorAttributes = new ArrayList(); + connectorAttributes.add(new ConnectorAttribute("host", "0.0.0.0", "The host name or IP to bind to. The normal values are 0.0.0.0 (all interfaces) or localhost (local connections only)", String.class, true)); + connectorAttributes.add(new ConnectorAttribute("port", 8009, "The network port to bind to.", Integer.class, true)); + connectorAttributes.add(new ConnectorAttribute("maxThreads", 10, "The maximum number of threads this connector should use to handle incoming requests", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("bufferSizeBytes", 8096, "Buffer size", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("acceptQueueSize", 10, "acceptQueueSize", Integer.class)); + connectorAttributes.add(new ConnectorAttribute("lingerMillis", 30000, "lingerMillis", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("tcpNoDelay", false, "tcpNoDelay", Boolean.class)); + connectorAttributes.add(new ConnectorAttribute("redirectPort", 8443, "redirectPort", Integer.class)); + //connectorAttributes.add(new ConnectorAttribute("maxIdleTimeMs", 30000, "maxIdleTimeMs", Integer.class)); + CONNECTOR_ATTRIBUTES.put(AJP_NIO, connectorAttributes); + + } + + private static Map CONNECTOR_GBEAN_INFOS = new HashMap(); + + static { + CONNECTOR_GBEAN_INFOS.put(HTTP_NIO, HTTPSelectChannelConnector.GBEAN_INFO); + CONNECTOR_GBEAN_INFOS.put(HTTPS_NIO, HTTPSSelectChannelConnector.GBEAN_INFO); + CONNECTOR_GBEAN_INFOS.put(HTTP_BLOCKING_NIO, HTTPBlockingConnector.GBEAN_INFO); + CONNECTOR_GBEAN_INFOS.put(HTTP_BIO, HTTPSocketConnector.GBEAN_INFO); + CONNECTOR_GBEAN_INFOS.put(HTTPS_BIO, HTTPSSocketConnector.GBEAN_INFO); + CONNECTOR_GBEAN_INFOS.put(AJP_NIO, AJP13Connector.GBEAN_INFO); + } + private final Kernel kernel; public JettyManagerImpl(Kernel kernel) { @@ -84,8 +210,7 @@ //todo: default HTTPS settings } else if (protocol.equals(PROTOCOL_AJP)) { connector = new GBeanData(name, AJP13Connector.GBEAN_INFO); - } - else { + } else { throw new IllegalArgumentException("Invalid protocol '" + protocol + "'"); } connector.setAttribute("host", host); @@ -95,7 +220,7 @@ connector.setAttribute("maxThreads", new Integer(50)); connector.setReferencePattern(JettyConnector.CONNECTOR_CONTAINER_REFERENCE, containerName); EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel); - if(mgr != null) { + if (mgr != null) { try { mgr.addGBeanToConfiguration(containerName.getArtifact(), connector, false); return (WebConnector) kernel.getProxyManager().createProxy(name, JettyWebConnector.class.getClassLoader()); @@ -119,7 +244,7 @@ AbstractNameQuery query = new AbstractNameQuery(JettyContainer.class.getName()); Set names = kernel.listGBeans(query); JettyContainer[] results = new JettyContainer[names.size()]; - int i=0; + int i = 0; for (Iterator it = names.iterator(); it.hasNext(); i++) { AbstractName name = (AbstractName) it.next(); results[i] = (JettyContainer) proxyManager.createProxy(name, JettyContainer.class.getClassLoader()); @@ -139,6 +264,7 @@ * Removes a connector. This shuts it down if necessary, and removes it * from the server environment. It must be a connector that this container * is responsible for. + * * @param connectorName */ public void removeConnector(AbstractName connectorName) { @@ -156,7 +282,7 @@ throw new GBeanNotFoundException(connectorName); } EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel); - if(mgr != null) { + if (mgr != null) { try { mgr.removeGBeanFromConfiguration(connectorName.getArtifact(), connectorName); } catch (InvalidConfigException e) { @@ -181,7 +307,7 @@ * @param protocol A protocol as returned by getSupportedProtocols */ public NetworkConnector[] getConnectors(String protocol) { - if(protocol == null) { + if (protocol == null) { return getConnectors(); } List result = new ArrayList(); @@ -204,12 +330,87 @@ public WebAccessLog getAccessLog(WebContainer container) { AbstractNameQuery query = new AbstractNameQuery(JettyLogManager.class.getName()); Set names = kernel.listGBeans(query); - if(names.size() == 0) { + if (names.size() == 0) { return null; - } else if(names.size() > 1) { + } else if (names.size() > 1) { throw new IllegalStateException("Should not be more than one Jetty access log manager"); } - return (WebAccessLog) kernel.getProxyManager().createProxy((AbstractName)names.iterator().next(), JettyLogManager.class.getClassLoader()); + return (WebAccessLog) kernel.getProxyManager().createProxy((AbstractName) names.iterator().next(), JettyLogManager.class.getClassLoader()); + } + + public List getConnectorTypes() { + return CONNECTOR_TYPES; + } + + public List getConnectorAttributes(ConnectorType connectorType) { + return ConnectorAttribute.copy(CONNECTOR_ATTRIBUTES.get(connectorType)); + } + + public AbstractName getConnectorConfiguration(ConnectorType connectorType, List connectorAttributes, WebContainer container, String uniqueName) { + GBeanInfo gbeanInfo = CONNECTOR_GBEAN_INFOS.get(connectorType); + AbstractName containerName = kernel.getAbstractNameFor(container); + AbstractName name = kernel.getNaming().createSiblingName(containerName, uniqueName, NameFactory.GERONIMO_SERVICE); + GBeanData gbeanData = new GBeanData(name, gbeanInfo); + gbeanData.setReferencePattern(JettyConnector.CONNECTOR_CONTAINER_REFERENCE, containerName); + for (ConnectorAttribute connectorAttribute : connectorAttributes) { + Object value = connectorAttribute.getValue(); + if (value != null) { + gbeanData.setAttribute(connectorAttribute.getAttributeName(), connectorAttribute.getValue()); + } + } + + // provide a reference to KeystoreManager gbean for HTTPS connectors + if (connectorType.equals(HTTPS_NIO) || connectorType.equals(HTTPS_BIO)) { + AbstractNameQuery query = new AbstractNameQuery(KeystoreManager.class.getName()); + gbeanData.setReferencePattern("KeystoreManager", query); + } + + EditableConfigurationManager mgr = ConfigurationUtil.getEditableConfigurationManager(kernel); + if (mgr != null) { + try { + mgr.addGBeanToConfiguration(containerName.getArtifact(), gbeanData, false); + } catch (InvalidConfigException e) { + log.error("Unable to add GBean", e); + return null; + } finally { + ConfigurationUtil.releaseConfigurationManager(kernel, mgr); + } + } else { + log.warn("The ConfigurationManager in the kernel does not allow editing"); + return null; + } + return name; + } + + public ConnectorType getConnectorType(AbstractName connectorName) { + ConnectorType connectorType = null; + try { + GBeanInfo info = kernel.getGBeanInfo(connectorName); + boolean found = false; + Set intfs = info.getInterfaces(); + for (Iterator it = intfs.iterator(); it.hasNext() && !found;) { + String intf = (String) it.next(); + if (intf.equals(JettyWebConnector.class.getName())) { + found = true; + } + } + if (!found) { + throw new GBeanNotFoundException(connectorName); + } + String searchingFor = info.getName(); + for (Entry entry : CONNECTOR_GBEAN_INFOS.entrySet() ) { + String candidate = entry.getValue().getName(); + if (candidate.equals(searchingFor)) { + return entry.getKey(); + } + } + } catch (GBeanNotFoundException e) { + log.warn("No such GBean '" + connectorName + "'"); + } catch (Exception e) { + log.error(e); + } + + return connectorType; } /** @@ -220,7 +421,7 @@ AbstractNameQuery query = new AbstractNameQuery(JettyWebConnector.class.getName()); Set names = kernel.listGBeans(query); JettyWebConnector[] results = new JettyWebConnector[names.size()]; - int i=0; + int i = 0; for (Iterator it = names.iterator(); it.hasNext(); i++) { AbstractName name = (AbstractName) it.next(); results[i] = (JettyWebConnector) proxyManager.createProxy(name, JettyWebConnector.class.getClassLoader()); @@ -229,7 +430,7 @@ } public NetworkConnector[] getConnectorsForContainer(Object container, String protocol) { - if(protocol == null) { + if (protocol == null) { return getConnectorsForContainer(container); } AbstractName containerName = kernel.getAbstractNameFor(container); @@ -242,21 +443,21 @@ AbstractName name = (AbstractName) it.next(); // a single Jetty connector GBeanData data = kernel.getGBeanData(name); ReferencePatterns refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE); - if(containerName.equals(refs.getAbstractName())) { + if (containerName.equals(refs.getAbstractName())) { try { String testProtocol = (String) kernel.getAttribute(name, "protocol"); - if(testProtocol != null && testProtocol.equals(protocol)) { + if (testProtocol != null && testProtocol.equals(protocol)) { results.add(mgr.createProxy(name, JettyWebConnector.class.getClassLoader())); } } catch (Exception e) { - log.error("Unable to look up protocol for connector '"+name+"'",e); + log.error("Unable to look up protocol for connector '" + name + "'", e); } break; } } return (JettyWebConnector[]) results.toArray(new JettyWebConnector[results.size()]); } catch (Exception e) { - throw (IllegalArgumentException)new IllegalArgumentException("Unable to look up connectors for Jetty container '"+containerName +"': ").initCause(e); + throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Jetty container '" + containerName + "': ").initCause(e); } } @@ -277,7 +478,7 @@ } return (JettyWebConnector[]) results.toArray(new JettyWebConnector[results.size()]); } catch (Exception e) { - throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Jetty container '"+containerName+"'").initCause(e); + throw (IllegalArgumentException) new IllegalArgumentException("Unable to look up connectors for Jetty container '" + containerName + "'").initCause(e); } } @@ -287,7 +488,7 @@ GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Jetty Web Manager", JettyManagerImpl.class); infoFactory.addAttribute("kernel", Kernel.class, false); infoFactory.addInterface(WebManager.class); - infoFactory.setConstructor(new String[] {"kernel"}); + infoFactory.setConstructor(new String[]{"kernel"}); GBEAN_INFO = infoFactory.getBeanInfo(); } Modified: geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyWebAppContext.java Wed Aug 1 22:51:18 2007 @@ -282,35 +282,6 @@ return jettyContainer; } - public URL getURLFor() { - WebConnector[] connectors = (WebConnector[]) jettyContainer.getConnectors(); - Map map = new HashMap(); - for (WebConnector connector : connectors) { - map.put(connector.getProtocol(), connector.getConnectUrl()); - } - String urlPrefix; - if ((urlPrefix = map.get("HTTP")) == null) { - if ((urlPrefix = map.get("HTTPS")) == null) { - urlPrefix = map.get("AJP"); - } - } - if (urlPrefix == null) { - return null; - } - StringBuffer buf = new StringBuffer(urlPrefix); - String contextPath = getContextPath(); - if (!contextPath.startsWith("/")) { - buf.append("/"); - } - buf.append(contextPath); - try { - return new URL(buf.toString()); - } catch (MalformedURLException e) { - log.error("Bad URL to connect to web app", e); - return null; - } - } - public void setContextPath(String path) { if (path == null || !path.startsWith("/")) { throw new IllegalArgumentException("context path must be non-null and start with '/', not " + path); Modified: geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPSSelectChannelConnector.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPSSelectChannelConnector.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPSSelectChannelConnector.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/connector/HTTPSSelectChannelConnector.java Wed Aug 1 22:51:18 2007 @@ -30,7 +30,7 @@ import org.apache.geronimo.gbean.GBeanInfoBuilder; import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory; import org.apache.geronimo.system.threads.ThreadPool; -import org.mortbay.jetty.bio.SocketConnector; +import org.mortbay.jetty.nio.SelectChannelConnector; /** * Implementation of a HTTPS connector based on Jetty's SslConnector (which uses pure JSSE). @@ -123,7 +123,7 @@ //TODO does this make sense??? public void setRedirectPort(int port) { - SocketConnector socketListener = (SocketConnector) listener; + SelectChannelConnector socketListener = (SelectChannelConnector) listener; socketListener.setConfidentialPort(port); socketListener.setIntegralPort(port); socketListener.setIntegralScheme("https"); Modified: geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebManager.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebManager.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebManager.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebManager.java Wed Aug 1 22:51:18 2007 @@ -16,7 +16,12 @@ */ package org.apache.geronimo.management.geronimo; -import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.beans.PropertyEditor; + +import org.apache.geronimo.gbean.AbstractName; +import org.apache.geronimo.common.propertyeditor.PropertyEditors; /** * Specialization of NetworkManager for web containers. @@ -41,6 +46,7 @@ * @param port The port that the connector should listen on * * @return The ObjectName of the new connector. + * @deprecated */ public WebConnector addConnector(WebContainer container, String uniqueName, String protocol, String host, int port); @@ -52,4 +58,133 @@ * */ public WebAccessLog getAccessLog(WebContainer container); + + List getConnectorTypes(); + + List getConnectorAttributes(ConnectorType connectorType); + + AbstractName getConnectorConfiguration(ConnectorType connectorType, List connectorAttributes, WebContainer container, String uniqueName); + + ConnectorType getConnectorType(AbstractName connectorName); + + public class ConnectorType { + private final String description; + + + public ConnectorType(String description) { + this.description = description; + } + + + public String getDescription() { + return description; + } + + + @Override + public int hashCode() { + final int PRIME = 31; + int result = 1; + result = PRIME * result + ((description == null) ? 0 : description.hashCode()); + return result; + } + + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final ConnectorType other = (ConnectorType) obj; + if (description == null) { + if (other.description != null) + return false; + } else if (!description.equals(other.description)) + return false; + return true; + } + } + + public class ConnectorAttribute { + private final String attributeName; + private String stringValue; + private final Class clazz; + private T value; + private final String description; + private boolean required; + + public ConnectorAttribute(String attributeName, T value, String description, Class clazz, boolean required) { + this.attributeName = attributeName; + this.value = value; + this.description = description; + this.clazz = clazz; + this.required = required; + } + + public ConnectorAttribute(String attributeName, T value, String description, Class clazz) { + this(attributeName, value, description, clazz, false); + } + + public ConnectorAttribute(ConnectorAttribute connectorAttribute) { + this.attributeName = connectorAttribute.attributeName; + this.value = connectorAttribute.value; + this.description = connectorAttribute.description; + this.clazz = connectorAttribute.clazz; + this.required = connectorAttribute.required; + } + + public String getAttributeName() { + return attributeName; + } + + public String getStringValue() { +// Class clazz = getClass().getTypeParameters(); + if (value == null) return null; + PropertyEditor propertyEditor = PropertyEditors.getEditor(clazz); + propertyEditor.setValue(value); + return propertyEditor.getAsText(); + } + + public void setStringValue(String stringValue) { + PropertyEditor propertyEditor = PropertyEditors.getEditor(clazz); + propertyEditor.setAsText(stringValue); + this.value = (T) propertyEditor.getValue(); + } + + public T getValue() { + return value; + } + + public void setValue(T value) { + this.value = value; + } + + public String getDescription() { + return description; + } + + public static List copy(List source) { + List copy = new ArrayList(source.size()); + for (ConnectorAttribute connectorAttribute: source) { + copy.add(new ConnectorAttribute(connectorAttribute)); + } + return copy; + } + + public Class getAttributeClass() { + return clazz; + } + + public boolean isRequired() { + return required; + } + + public void setRequired(boolean required) { + this.required = required; + } + + } } Modified: geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebModule.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebModule.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebModule.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/WebModule.java Wed Aug 1 22:51:18 2007 @@ -36,13 +36,6 @@ public WebContainer getContainer(); /** - * Gets a URL that can be used to access this web application. Prefers - * HTTP if available, then HTTPS, then AJP, depending on what the hosting - * web container makes available. - */ - public URL getURLFor(); - - /** * Gets a name for this WAR file that can be used to identify the WAR to a * user. This is not guaranteed to be anything in particular. */ Modified: geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/StartupMonitorUtil.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/StartupMonitorUtil.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/StartupMonitorUtil.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/StartupMonitorUtil.java Wed Aug 1 22:51:18 2007 @@ -57,7 +57,7 @@ apps.add(" " + decodeModule(name.getNameProperty("j2eeType")) + ": " + name.getNameProperty("name")); } if (isWebModule(name)) { - webs.add(kernel.getAttribute(name, "URLFor").toString()); + webs.add(kernel.getAttribute(name, "contextPath").toString()); } int stateValue = kernel.getGBeanState(name); Modified: geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?view=diff&rev=562021&r1=562020&r2=562021 ============================================================================== --- geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java (original) +++ geronimo/server/branches/2.0/modules/geronimo-tomcat6-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java Wed Aug 1 22:51:18 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();