geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r278800 [2/3] - in /geronimo/trunk: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-standard/src/java/org/apache/geronimo/console/infomanager/ applications/console-standard/src/java/org/apache/geron...
Date Mon, 05 Sep 2005 17:11:14 GMT
Modified: geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml (original)
+++ geronimo/trunk/modules/assembly/src/plan/tomcat-config.xml Mon Sep  5 10:10:49 2005
@@ -1,261 +1 @@
-<!--
-
-Copyright 2004 The Apache Software Foundation
-
-Licensed 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.
--->
-
-<!-- $Rev: 111627 $ $Date: 2004-12-12 03:15:11 +0100 (Sun, 12 Dec 2004) $ -->
-
-<!--
-Configuration for the main ring of a Geronimo server.
-
-This configuration should contain those services normally provided
-by the server.
--->
-
-<!-- TOMCAT CONFIGURATION STARTS HERE -->
-
-    <dependency>
-        <uri>geronimo/jars/geronimo-tomcat-${geronimo_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/catalina-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/catalina-optional-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/tomcat-coyote-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/tomcat-http-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/tomcat-util-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/naming-resources-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/servlets-default-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/servlets-invoker-${tomcat_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-beanutils/jars/commons-beanutils-${commons_beanutils_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-collections/jars/commons-collections-${commons_collections_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-digester/jars/commons-digester-${commons_digester_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-el/jars/commons-el-${commons_el_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-modeler/jars/commons-modeler-${commons_modeler_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>regexp/jars/regexp-${regexp_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>mx4j/jars/mx4j-${mx4j_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/jasper-compiler-${jasper_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/jasper-compiler-jdt-${jasper_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/jasper-runtime-${jasper_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>tomcat/jars/tomcat-ajp-${tomcat_ajp_version}.jar</uri>
-    </dependency>
-    <dependency>
-        <uri>commons-el/jars/commons-el-${commons_el_version}.jar</uri>
-    </dependency>
-
-    <!-- JAAS Geronimo Login Configuration -->
-    <gbean name="tomcat-properties-realm"
-        class="org.apache.geronimo.security.realm.GenericSecurityRealm">
-        <attribute name="realmName">Geronimo</attribute>
-        <reference name="LoginModuleConfiguration">
-            <name>tomcat-properties</name>
-        </reference>
-        <reference name="ServerInfo">
-            <module>org/apache/geronimo/System</module>
-            <name>ServerInfo</name>
-        </reference>
-        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
-    </gbean>
-
-    <gbean name="tomcat-properties" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
-        <attribute name="controlFlag">REQUIRED</attribute>
-        <reference name="LoginModule">
-            <name>properties-login</name>
-        </reference>
-    </gbean>
-
-    <!-- The following is the equivalent of the server.xml file, but done with GBeans -->
-
-    <!-- The TomcatContainer/Service -->
-    <gbean name="WebContainer" class="org.apache.geronimo.tomcat.TomcatContainer">
-        <attribute name="catalinaHome">var/catalina</attribute>
-        <reference name="EngineGBean">
-            <name>TomcatEngine</name>
-        </reference>
-        <reference name="ServerInfo">
-            <module>org/apache/geronimo/System</module>
-            <name>ServerInfo</name>
-        </reference>
-    </gbean>
-
-    <gbean name="TomcatWebConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
-        <attribute name="name">HTTP</attribute>
-        <attribute name="host">0.0.0.0</attribute>
-        <attribute name="port">${PlanHTTPPort}</attribute>
-        <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
-        <attribute name="maxThreads">150</attribute>
-        <attribute name="minSpareThreads">25</attribute>
-        <attribute name="maxSpareThreads">75</attribute>
-        <attribute name="hostLookupEnabled">false</attribute>
-        <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
-        <attribute name="acceptQueueSize">100</attribute>
-        <attribute name="connectionTimeoutMillis">20000</attribute>
-        <attribute name="uploadTimeoutEnabled">false</attribute>
-        <reference name="TomcatContainer">
-            <name>WebContainer</name>
-        </reference>
-    </gbean>
-
-    <gbean name="TomcatAJPConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
-        <attribute name="protocol">AJP</attribute>
-        <attribute name="name">AJP</attribute>
-        <attribute name="host">0.0.0.0</attribute>
-        <attribute name="port">${PlanAJPPort}</attribute>
-        <attribute name="hostLookupEnabled">false</attribute>
-        <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
-        <reference name="TomcatContainer">
-            <name>WebContainer</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">
-        <attribute name="name">HTTPS</attribute>
-        <attribute name="host">0.0.0.0</attribute>
-        <attribute name="port">${PlanHTTPSPort}</attribute>
-        <attribute name="maxHttpHeaderSizeBytes">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="secureProtocol">TLS</attribute>
-        <attribute name="keystoreFileName">var/security/keystore</attribute>
-        <attribute name="keystorePassword">secret</attribute>
-        <reference name="TomcatContainer"><name>WebContainer</name></reference>
-        <reference name="ServerInfo">
-            <module>org/apache/geronimo/System</module>
-            <name>ServerInfo</name>
-        </reference>
-    </gbean>
-
-    <!-- Engine -->
-    <gbean name="TomcatEngine" class="org.apache.geronimo.tomcat.EngineGBean">
-        <attribute name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
-        <attribute name="initParams">
-            name=Geronimo
-            defaultHost=${PlanServerHostname}
-        </attribute>
-        <references name="Hosts">
-            <pattern><gbean-name>geronimo.server:j2eeType=Host,*</gbean-name></pattern>
-        </references>
-        <reference name="RealmGBean">
-            <name>TomcatJAASRealm</name>
-        </reference>
-        <reference name="TomcatValveChain">
-            <name>FirstValve</name>
-        </reference> 
-    </gbean>
-
-    <!-- Valve -->
-    <gbean name="FirstValve" class="org.apache.geronimo.tomcat.ValveGBean">
-        <attribute name="className">org.apache.catalina.valves.AccessLogValve</attribute>
-        <attribute name="initParams">
-            prefix=${PlanServerHostname}_access_log.
-            suffix=.txt
-            pattern=common
-        </attribute>
-    <!-- Uncomment this section to add second valve for a chain.  This example consists of the Tomcat
-          AccessLogValve and SingleSignOn. Notice the dependency that chains the FirstValve with the
-          SecondValve.  The valves will be added in the order that they are chained.
-        <reference name="NextValve"><moduleType>J2EEModule</moduleType><name>SecondValve</name></reference>
-    -->
-    </gbean>
-    <!-- Uncomment this section to add this valve  to the chain.  This example consists of the Tomcat
-          SingleSignOn. 
-    <gbean name="SecondValve" class="org.apache.geronimo.tomcat.ValveGBean">
-        <attribute name="className">org.apache.catalina.authenticator.SingleSignOn</attribute>
-    </gbean>
-    -->
-
-    <!-- Realm -->
-    <!-- This is an example TomcatJAASRealm -->
-    <gbean name="TomcatJAASRealm" class="org.apache.geronimo.tomcat.RealmGBean">
-        <attribute name="className">org.apache.geronimo.tomcat.realm.TomcatJAASRealm</attribute>
-        <attribute name="initParams">
-            userClassNames=org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal
-            roleClassNames=org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal
-        </attribute>
-    </gbean>
-
-    <!-- Host -->
-    <gbean name="TomcatHost" class="org.apache.geronimo.tomcat.HostGBean">
-        <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
-        <attribute name="initParams">
-            name=${PlanServerHostname}
-            appBase=
-            workDir=work
-        </attribute>
-        <!-- You may attach a Realm to a Host as well.  Only attach to the Engine *or* the Host.
-             Attempting to add the same Realm GBeans to the Engine *and* Host at the same time
-             will result in an error.
-
-             Uncomment this to add the Realm to the Host 
-        <reference name="RealmGBean">
-            <name>TomcatJAASRealm</name>
-        </reference>
-        -->
-        <!-- You may attach a Valve chain to a Host as well.  Only attach to the Engine *or* the Host.
-             Attempting to add the same valve GBeans to the Engine *and* Host at the same time
-             will result in an error.
-
-             Uncomment this to add the valve chain to the Host 
-        <reference name="TomcatValveChain">
-            <name>FirstValve</name>
-        </reference> 
-        -->
-    </gbean>
-
-<!-- TOMCAT CONFIGURATION ENDS HERE -->
-
+<!--

Copyright 2004 The Apache Software Foundation

Licensed 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.
-->

<!-- $Rev: 111627 $ $Date: 2004-12-12 03:15:11 +0100 (Sun, 12 Dec 2004) $ -->

<!--
Configuration for the main ring of a Geronimo server.

This configuration should contain those services normally provided
by the server.
-->

<!-- TOMCAT CONFIGURATION STARTS HERE -->

    <dependency>
        <uri>geronimo/jars/geronimo-tomcat-${geronimo_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomc
 at/jars/catalina-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/catalina-optional-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/tomcat-coyote-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/tomcat-http-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/tomcat-util-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/naming-resources-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/servlets-default-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/servlets-invoker-${tomcat_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>commons-beanutils/jars/commons-beanutils-${commons_beanutils_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>commons-collections/jars/commons-collections-
 ${commons_collections_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>commons-digester/jars/commons-digester-${commons_digester_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>commons-el/jars/commons-el-${commons_el_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>commons-modeler/jars/commons-modeler-${commons_modeler_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>regexp/jars/regexp-${regexp_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>mx4j/jars/mx4j-${mx4j_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/jasper-compiler-${jasper_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/jasper-compiler-jdt-${jasper_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/jasper-runtime-${jasper_version}.jar</uri>
    </dependency>
    <dependency>
        <uri>tomcat/jars/tomcat-ajp-${tomcat_ajp_version}.ja
 r</uri>
    </dependency>
    <dependency>
        <uri>commons-el/jars/commons-el-${commons_el_version}.jar</uri>
    </dependency>

    <!-- JAAS Geronimo Login Configuration -->
    <gbean name="tomcat-properties-realm"
        class="org.apache.geronimo.security.realm.GenericSecurityRealm">
        <attribute name="realmName">Geronimo</attribute>
        <reference name="LoginModuleConfiguration">
            <name>tomcat-properties</name>
        </reference>
        <reference name="ServerInfo">
            <module>org/apache/geronimo/System</module>
            <name>ServerInfo</name>
        </reference>
        <reference name="LoginService"><module>org/apache/geronimo/Server</module><name>JaasLoginService</name></reference>
    </gbean>

    <gbean name="tomcat-properties" class="org.apache.geronimo.security.jaas.JaasLoginModuleUse">
        <attribute name="controlFlag">REQUIRED</attribute>
        <reference name="LoginModule">
            <name>properties-login<
 /name>
        </reference>
    </gbean>
    
    <!-- Tomcat WebManager service -->
    <gbean name="TomcatWebManager" class="org.apache.geronimo.tomcat.TomcatManagerImpl" />


    <!-- The following is the equivalent of the server.xml file, but done with GBeans -->

    <!-- The TomcatContainer/Service -->
    <gbean name="WebContainer" class="org.apache.geronimo.tomcat.TomcatContainer">
        <attribute name="catalinaHome">var/catalina</attribute>
        <reference name="EngineGBean">
            <name>TomcatEngine</name>
        </reference>
        <reference name="ServerInfo">
            <module>org/apache/geronimo/System</module>
            <name>ServerInfo</name>
        </reference>
    </gbean>

    <gbean name="TomcatWebConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
        <attribute name="name">HTTP</attribute>
        <attribute name="host">0.0.0.0</attribute>
        <attribute name="port">${PlanHTTPPort}</attribute>
        <attribute name
 ="maxHttpHeaderSizeBytes">8192</attribute>
        <attribute name="maxThreads">150</attribute>
        <attribute name="minSpareThreads">25</attribute>
        <attribute name="maxSpareThreads">75</attribute>
        <attribute name="hostLookupEnabled">false</attribute>
        <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
        <attribute name="acceptQueueSize">100</attribute>
        <attribute name="connectionTimeoutMillis">20000</attribute>
        <attribute name="uploadTimeoutEnabled">false</attribute>
        <reference name="TomcatContainer">
            <name>WebContainer</name>
        </reference>
    </gbean>

    <gbean name="TomcatAJPConnector" class="org.apache.geronimo.tomcat.ConnectorGBean">
        <attribute name="protocol">AJP</attribute>
        <attribute name="name">AJP</attribute>
        <attribute name="host">0.0.0.0</attribute>
        <attribute name="port">${PlanAJPPort}</attribute>
        <attribute name="hostLookupEnabled">fal
 se</attribute>
        <attribute name="redirectPort">${PlanHTTPSPort}</attribute>
        <reference name="TomcatContainer">
            <name>WebContainer</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">
        <attribute name="name">HTTPS</attribute>
        <attribute name="host">0.0.0.0</attribute>
        <attribute name="port">${PlanHTTPSPort}</attribute>
        <attribute name="maxHttpHeaderSizeBytes">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="secureProtocol">TLS</attribute>
        <attribute name="keystoreFileName">var/security/keystore</attribute>
        <attribute name="keystorePassword">secret</attribute>
        <reference name="TomcatContainer"><name>WebContainer</name></reference>
        <reference name="ServerInfo">
            <module>org/apache/geronimo/System</module>
            <name>ServerInfo</name>
        </reference>
    </gbean>

    <!-- Engine -->
    <gbean name="TomcatEngine" class="org.apache.geronimo.tomcat.EngineGBean">
        <attribute name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
        <attribute name="initParams">
            name=Geronimo
            defaultHost=${PlanServerHostname}
        </attribute>
        <references name="Hosts">
            <pattern><gbean-name>geronimo.server:j2eeType=Host,*</gbean-name></pattern>
        </references>
        <reference name="RealmGB
 ean">
            <name>TomcatJAASRealm</name>
        </reference>
        <reference name="TomcatValveChain">
            <name>FirstValve</name>
        </reference> 
    </gbean>

    <!-- Valve -->
    <gbean name="FirstValve" class="org.apache.geronimo.tomcat.ValveGBean">
        <attribute name="className">org.apache.catalina.valves.AccessLogValve</attribute>
        <attribute name="initParams">
            prefix=${PlanServerHostname}_access_log.
            suffix=.txt
            pattern=common
        </attribute>
    <!-- Uncomment this section to add second valve for a chain.  This example consists of the Tomcat
          AccessLogValve and SingleSignOn. Notice the dependency that chains the FirstValve with the
          SecondValve.  The valves will be added in the order that they are chained.
        <reference name="NextValve"><moduleType>J2EEModule</moduleType><name>SecondValve</name></reference>
    -->
    </gbean>
    <!-- Uncomment this section to add t
 his valve  to the chain.  This example consists of the Tomcat
          SingleSignOn. 
    <gbean name="SecondValve" class="org.apache.geronimo.tomcat.ValveGBean">
        <attribute name="className">org.apache.catalina.authenticator.SingleSignOn</attribute>
    </gbean>
    -->

    <!-- Realm -->
    <!-- This is an example TomcatJAASRealm -->
    <gbean name="TomcatJAASRealm" class="org.apache.geronimo.tomcat.RealmGBean">
        <attribute name="className">org.apache.geronimo.tomcat.realm.TomcatJAASRealm</attribute>
        <attribute name="initParams">
            userClassNames=org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal
            roleClassNames=org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal
        </attribute>
    </gbean>

    <!-- Host -->
    <gbean name="TomcatHost" class="org.apache.geronimo.tomcat.HostGBean">
        <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
        <attribute nam
 e="initParams">
            name=${PlanServerHostname}
            appBase=
            workDir=work
        </attribute>
        <!-- You may attach a Realm to a Host as well.  Only attach to the Engine *or* the Host.
             Attempting to add the same Realm GBeans to the Engine *and* Host at the same time
             will result in an error.

             Uncomment this to add the Realm to the Host 
        <reference name="RealmGBean">
            <name>TomcatJAASRealm</name>
        </reference>
        -->
        <!-- You may attach a Valve chain to a Host as well.  Only attach to the Engine *or* the Host.
             Attempting to add the same valve GBeans to the Engine *and* Host at the same time
             will result in an error.

             Uncomment this to add the valve chain to the Host 
        <reference name="TomcatValveChain">
            <name>FirstValve</name>
        </reference> 
        -->
    </gbean>

<!-- TOMCAT CONFIGURATION ENDS HERE -
 ->
\ No newline at end of file

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java Mon Sep  5 10:10:49 2005
@@ -31,8 +31,9 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.geronimo.J2EEServer;
 import org.apache.geronimo.management.geronimo.WebContainer;
-import org.apache.geronimo.management.geronimo.EJBContainer;
+import org.apache.geronimo.management.geronimo.EJBManager;
 import org.apache.geronimo.management.geronimo.JMSManager;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.pool.GeronimoExecutor;
 
 /**
@@ -113,34 +114,49 @@
         return Util.getObjectNames(kernel, baseName, new String[]{"JVM"});
     }
 
-    public String getWebContainer() {
-        GBeanQuery query = new GBeanQuery(null, WebContainer.class.getName());
+    public String[] getWebManagers() {
+        GBeanQuery query = new GBeanQuery(null, WebManager.class.getName());
         Set set = kernel.listGBeans(query);
         if(set.size() == 0) {
             return null;
-        } else { // ignore possibility of multiple results
-            return ((ObjectName)set.iterator().next()).getCanonicalName();
         }
+        String[] results = new String[set.size()];
+        int i=0;
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            results[i++] = name.getCanonicalName();
+        }
+        return results;
     }
 
-    public String getEJBContainer() {
-        GBeanQuery query = new GBeanQuery(null, EJBContainer.class.getName());
+    public String[] getEJBManagers() {
+        GBeanQuery query = new GBeanQuery(null, EJBManager.class.getName());
         Set set = kernel.listGBeans(query);
         if(set.size() == 0) {
             return null;
-        } else { // ignore possibility of multiple results
-            return ((ObjectName)set.iterator().next()).getCanonicalName();
         }
+        String[] results = new String[set.size()];
+        int i=0;
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            results[i++] = name.getCanonicalName();
+        }
+        return results;
     }
 
-    public String getJMSManager() {
+    public String[] getJMSManagers() {
         GBeanQuery query = new GBeanQuery(null, JMSManager.class.getName());
         Set set = kernel.listGBeans(query);
         if(set.size() == 0) {
             return null;
-        } else { // ignore possibility of multiple results
-            return ((ObjectName)set.iterator().next()).getCanonicalName();
         }
+        String[] results = new String[set.size()];
+        int i=0;
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            results[i++] = name.getCanonicalName();
+        }
+        return results;
     }
 
     public String[] getThreadPools() {

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java Mon Sep  5 10:10:49 2005
@@ -147,18 +147,6 @@
         return NODE;
     }
 
-    public long getFreeMemory() {
-        return runtime.freeMemory();
-    }
-
-    public long getMaxMemory() {
-        return runtime.maxMemory();
-    }
-
-    public long getTotalMemory() {
-        return runtime.totalMemory();
-    }
-
     public int getAvailableProcessors() {
         return runtime.availableProcessors();
     }
@@ -168,19 +156,26 @@
     }
 
     public Stats getStats() {
+        BoundedRangeImpl heap;
         if(stats == null) {
             stats = new JVMStatsImpl();
             long start = kernel.getBootTime().getTime();
             stats.getUpTimeImpl().setCount(start);
             stats.getUpTimeImpl().setStartTime(start);
-            stats.getHeapSizeImpl().setStartTime(start);
+            heap = stats.getHeapSizeImpl();
+            heap.setStartTime(start);
+            heap.setBounds(0, runtime.totalMemory());
+            heap.setCurrent(heap.getUpperBound() - runtime.freeMemory());
+            heap.setLowWaterMark(heap.getCurrent());
+            heap.setHighWaterMark(heap.getCurrent());
+        } else {
+            heap = stats.getHeapSizeImpl();
+            heap.setBounds(0, runtime.totalMemory());
+            heap.setCurrent(heap.getUpperBound() - runtime.freeMemory());
         }
-        final BoundedRangeImpl heap = stats.getHeapSizeImpl();
         long now = System.currentTimeMillis();
         stats.getUpTimeImpl().setLastSampleTime(now);
         heap.setLastSampleTime(now);
-        heap.setBounds(0, runtime.totalMemory());
-        heap.setCurrent(heap.getUpperBound() - runtime.freeMemory());
         return stats;
     }
 

Modified: geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java (original)
+++ geronimo/trunk/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java Mon Sep  5 10:10:49 2005
@@ -18,6 +18,7 @@
 package org.apache.geronimo.j2ee.management;
 
 import java.net.InetAddress;
+import javax.management.j2ee.statistics.JVMStats;
 import org.apache.geronimo.management.JVM;
 
 /**
@@ -46,21 +47,33 @@
     public void testGeronimoInterface() {
         assertEquals(runtime.availableProcessors(), jvmEx.getAvailableProcessors());
 
-        // I'm going to leave these in but I am not sure the results are deterministic
-//        assertEquals(runtime.freeMemory(), jvmEx.getFreeMemory());
-        assertEquals(runtime.maxMemory(), jvmEx.getMaxMemory());
-        assertEquals(runtime.totalMemory(), jvmEx.getTotalMemory());
-
     }
 
     public void testGeronimoAttributes() throws Exception {
         assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_NAME, "availableProcessors"));
+    }
 
-        // I'm going to leave these in but I am not sure the results are deterministic
-//        assertEquals(new Long(runtime.freeMemory()), kernel.getAttribute(JVM_NAME, "freeMemory"));
-        assertEquals(new Long(runtime.maxMemory()), kernel.getAttribute(JVM_NAME, "maxMemory"));
-        assertEquals(new Long(runtime.totalMemory()), kernel.getAttribute(JVM_NAME, "totalMemory"));
-
+    public void testStatistics() throws Exception {
+        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_NAME, "statisticsProvider"));
+        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_NAME, "stats");
+        assertNotNull(stats.getHeapSize());
+        assertTrue(stats.getHeapSize().getCurrent() > 0);
+        assertNotNull(stats.getHeapSize().getDescription());
+        assertTrue(stats.getHeapSize().getHighWaterMark() > 0);
+        assertTrue(stats.getHeapSize().getLastSampleTime() > 0);
+        assertTrue(stats.getHeapSize().getLowerBound() == 0);
+        assertTrue(stats.getHeapSize().getLowWaterMark() > 0);
+        assertNotNull(stats.getHeapSize().getName());
+        assertTrue(stats.getHeapSize().getStartTime() > 0);
+        assertNotNull(stats.getHeapSize().getUnit());
+        assertTrue(stats.getHeapSize().getUpperBound() > 0);
+        assertNotNull(stats.getUpTime());
+        assertTrue(stats.getUpTime().getCount() > 0);
+        assertNotNull(stats.getUpTime().getDescription());
+        assertTrue(stats.getUpTime().getLastSampleTime() > 0);
+        assertNotNull(stats.getUpTime().getName());
+        assertTrue(stats.getUpTime().getStartTime() > 0);
+        assertNotNull(stats.getUpTime().getUnit());
     }
 
     protected void setUp() throws Exception {

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyContainerImpl.java Mon Sep  5 10:10:49 2005
@@ -17,31 +17,11 @@
 
 package org.apache.geronimo.jetty;
 
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
-import org.apache.geronimo.gbean.GBeanQuery;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.j2ee.management.impl.Util;
-import org.apache.geronimo.jetty.connector.AJP13Connector;
-import org.apache.geronimo.jetty.connector.HTTPConnector;
-import org.apache.geronimo.jetty.connector.HTTPSConnector;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
 import org.mortbay.http.HttpContext;
@@ -54,20 +34,11 @@
  * @version $Rev$ $Date$
  */
 public class JettyContainerImpl implements JettyContainer, SoapHandler, GBeanLifecycle {
-    private final static Log log = LogFactory.getLog(JettyContainerImpl.class);
     private final Server server;
     private final Map webServices = new HashMap();
-    private Kernel kernel;
-    private ObjectName myName;
 
-    public JettyContainerImpl(Kernel kernel, String objectName) {
+    public JettyContainerImpl() {
         server = new JettyServer();
-        this.kernel = kernel;
-        try {
-            myName = ObjectName.getInstance(objectName);
-        } catch (MalformedObjectNameException e) {
-            log.error(e);
-        }
     }
 
     public void resetStatistics() {
@@ -179,135 +150,6 @@
         server.setRequestLog(log);
     }
 
-    /**
-     * Gets the protocols which this container can configure connectors for.
-     */
-    public String[] getSupportedProtocols() {
-        return new String[]{PROTOCOL_HTTP, PROTOCOL_HTTPS, PROTOCOL_AJP};
-    }
-
-    /**
-     * Gets the ObjectNames of any existing connectors for the specified
-     * protocol.
-     *
-     * @param protocol A protocol as returned by getSupportedProtocols
-     */
-    public String[] getConnectors(String protocol) {
-        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
-        Set names = kernel.listGBeans(query);
-        List result = new ArrayList();
-        for (Iterator it = names.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            try {
-                if (kernel.getAttribute(name, "protocol").equals(protocol)) {
-                    result.add(name.getCanonicalName());
-                }
-            } catch (Exception e) {
-                log.error("Unable to check the protocol for a connector", e);
-            }
-        }
-        return (String[]) result.toArray(new String[result.size()]);
-    }
-
-    /**
-     * Gets the ObjectNames of any existing connectors.
-     */
-    public String[] getConnectors() {
-        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
-        Set names = kernel.listGBeans(query);
-        String[] result = new String[names.size()];
-        int i = 0;
-        for (Iterator it = names.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            result[i++] = name.getCanonicalName();
-        }
-        return result;
-    }
-
-    /**
-     * Creates a new connector, and returns the ObjectName for it.  Note that
-     * the connector may well require further customization before being fully
-     * functional (e.g. SSL settings for an HTTPS connector).
-     */
-    public String addConnector(String uniqueName, String protocol, String host, int port) {
-        ObjectName name = getConnectorName(protocol, uniqueName);
-        GBeanData connector;
-        if (protocol.equals(PROTOCOL_HTTP)) {
-            connector = new GBeanData(name, HTTPConnector.GBEAN_INFO);
-        } else if (protocol.equals(PROTOCOL_HTTPS)) {
-            connector = new GBeanData(name, HTTPSConnector.GBEAN_INFO);
-            GBeanQuery query = new GBeanQuery(null, ServerInfo.class.getName());
-            Set set = kernel.listGBeans(query);
-            connector.setReferencePattern("ServerInfo", (ObjectName) set.iterator().next());
-            //todo: default HTTPS settings
-        } else if (protocol.equals(PROTOCOL_AJP)) {
-            connector = new GBeanData(name, AJP13Connector.GBEAN_INFO);
-        } else {
-            throw new IllegalArgumentException("Invalid protocol '" + protocol + "'");
-        }
-        connector.setAttribute("host", host);
-        connector.setAttribute("port", new Integer(port));
-        connector.setAttribute("minThreads", new Integer(10));
-        connector.setAttribute("maxThreads", new Integer(50));
-        connector.setReferencePattern("JettyContainer", myName);
-        ObjectName config = Util.getConfiguration(kernel, myName);
-        try {
-            kernel.invoke(config, "addGBean", new Object[]{connector, Boolean.FALSE}, new String[]{GBeanData.class.getName(), boolean.class.getName()});
-        } catch (Exception e) {
-            log.error("Unable to add GBean ", e);
-            return null;
-        }
-        return name.getCanonicalName();
-    }
-
-    private ObjectName getConnectorName(String protocol, String uniqueName) {
-        Hashtable table = new Hashtable();
-        table.put(NameFactory.J2EE_APPLICATION, myName.getKeyProperty(NameFactory.J2EE_APPLICATION));
-        table.put(NameFactory.J2EE_SERVER, myName.getKeyProperty(NameFactory.J2EE_SERVER));
-        table.put(NameFactory.J2EE_MODULE, myName.getKeyProperty(NameFactory.J2EE_MODULE));
-        table.put(NameFactory.J2EE_TYPE, myName.getKeyProperty(NameFactory.J2EE_TYPE));
-        table.put(NameFactory.J2EE_NAME, "JettyWebConnector-" + protocol + "-" + uniqueName);
-        try {
-            return ObjectName.getInstance(myName.getDomain(), table);
-        } catch (MalformedObjectNameException e) {
-            throw new IllegalStateException("Never should have failed: " + e.getMessage());
-        }
-    }
-
-    /**
-     * 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.
-     */
-    public void removeConnector(String objectName) {
-        ObjectName name = null;
-        try {
-            name = ObjectName.getInstance(objectName);
-        } catch (MalformedObjectNameException e) {
-            throw new IllegalArgumentException("Invalid object name '" + objectName + "': " + e.getMessage());
-        }
-        try {
-            GBeanInfo info = kernel.getGBeanInfo(name);
-            boolean found = false;
-            Set intfs = info.getInterfaces();
-            for (Iterator it = intfs.iterator(); it.hasNext();) {
-                String intf = (String) it.next();
-                if (intf.equals(JettyWebConnector.class.getName())) {
-                    found = true;
-                }
-            }
-            if (!found) {
-                throw new GBeanNotFoundException(name);
-            }
-            ObjectName config = Util.getConfiguration(kernel, name);
-            kernel.invoke(config, "removeGBean", new Object[]{name}, new String[]{ObjectName.class.getName()});
-        } catch (GBeanNotFoundException e) {
-            log.warn("No such GBean '" + objectName + "'"); //todo: what if we want to remove a failed GBean?
-        } catch (Exception e) {
-            log.error(e);
-        }
-    }
-
     /* ------------------------------------------------------------ */
     public RequestLog getRequestLog() {
         return server.getRequestLog();
@@ -336,9 +178,8 @@
 
     static {
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Jetty Web Container", JettyContainerImpl.class);
-        infoBuilder.addAttribute("kernel", Kernel.class, false);
-        infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addAttribute("collectStatistics", Boolean.TYPE, true);
+        //todo: Move all statistics methods to a Stats implementation
         infoBuilder.addAttribute("collectStatisticsStarted", Long.TYPE, false);
         infoBuilder.addAttribute("connections", Integer.TYPE, false);
         infoBuilder.addAttribute("connectionsOpen", Integer.TYPE, false);
@@ -366,7 +207,7 @@
 
         infoBuilder.addInterface(SoapHandler.class);
         infoBuilder.addInterface(JettyContainer.class);
-        infoBuilder.setConstructor(new String[]{"kernel", "objectName"});
+        infoBuilder.setConstructor(new String[]{});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }

Added: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java?rev=278800&view=auto
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java (added)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java Mon Sep  5 10:10:49 2005
@@ -0,0 +1,308 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.jetty;
+
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Hashtable;
+import javax.management.ObjectName;
+import javax.management.MalformedObjectNameException;
+import org.apache.geronimo.management.geronimo.WebManager;
+import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.jetty.connector.HTTPConnector;
+import org.apache.geronimo.jetty.connector.HTTPSConnector;
+import org.apache.geronimo.jetty.connector.AJP13Connector;
+import org.apache.geronimo.jetty.connector.JettyConnector;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.j2ee.management.impl.Util;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Jetty implementation of WebManager.  Knows how to manipulate
+ * other Jetty objects for management purposes.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public class JettyManagerImpl implements WebManager {
+    private final static Log log = LogFactory.getLog(JettyManagerImpl.class);
+    private final Kernel kernel;
+
+    public JettyManagerImpl(Kernel kernel) {
+        this.kernel = kernel;
+    }
+
+    /**
+     * Creates a new connector, and returns the ObjectName for it.  Note that
+     * the connector may well require further customization before being fully
+     * functional (e.g. SSL settings for an HTTPS connector).
+     */
+    public String addConnector(String containerObjectName, String uniqueName, String protocol, String host, int port) {
+        ObjectName container;
+        try {
+            container = ObjectName.getInstance(containerObjectName);
+        } catch (MalformedObjectNameException e) {
+            throw new IllegalArgumentException("Invalid web container ObjectName '"+containerObjectName+"'");
+        }
+        ObjectName name = getConnectorName(container, protocol, uniqueName);
+        GBeanData connector;
+        if (protocol.equals(PROTOCOL_HTTP)) {
+            connector = new GBeanData(name, HTTPConnector.GBEAN_INFO);
+        } else if (protocol.equals(PROTOCOL_HTTPS)) {
+            connector = new GBeanData(name, HTTPSConnector.GBEAN_INFO);
+            GBeanQuery query = new GBeanQuery(null, ServerInfo.class.getName());
+            Set set = kernel.listGBeans(query);
+            connector.setReferencePattern("ServerInfo", (ObjectName) set.iterator().next());
+            //todo: default HTTPS settings
+        } else if (protocol.equals(PROTOCOL_AJP)) {
+            connector = new GBeanData(name, AJP13Connector.GBEAN_INFO);
+        } else {
+            throw new IllegalArgumentException("Invalid protocol '" + protocol + "'");
+        }
+        connector.setAttribute("host", host);
+        connector.setAttribute("port", new Integer(port));
+        connector.setAttribute("minThreads", new Integer(10));
+        connector.setAttribute("maxThreads", new Integer(50));
+        connector.setReferencePattern(JettyConnector.CONNECTOR_CONTAINER_REFERENCE, container);
+        ObjectName config = Util.getConfiguration(kernel, container);
+        try {
+            kernel.invoke(config, "addGBean", new Object[]{connector, Boolean.FALSE}, new String[]{GBeanData.class.getName(), boolean.class.getName()});
+        } catch (Exception e) {
+            log.error("Unable to add GBean ", e);
+            return null;
+        }
+        return name.getCanonicalName();
+    }
+
+    /**
+     * Get a list of containers for this web implementation.
+     */
+    public String[] getContainers() {
+        GBeanQuery query = new GBeanQuery(null, JettyContainer.class.getName());
+        Set names = kernel.listGBeans(query);
+        String[] result = new String[names.size()];
+        int i = 0;
+        for (Iterator it = names.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            result[i++] = name.getCanonicalName();
+        }
+        return result;
+    }
+
+    /**
+     * Gets the protocols that this web container supports (that you can create
+     * connectors for).
+     */
+    public String[] getSupportedProtocols() {
+        return new String[]{PROTOCOL_HTTP, PROTOCOL_HTTPS, PROTOCOL_AJP};
+    }
+
+    /**
+     * 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.
+     */
+    public void removeConnector(String objectName) {
+        ObjectName name = null;
+        try {
+            name = ObjectName.getInstance(objectName);
+        } catch (MalformedObjectNameException e) {
+            throw new IllegalArgumentException("Invalid object name '" + objectName + "': " + e.getMessage());
+        }
+        try {
+            GBeanInfo info = kernel.getGBeanInfo(name);
+            boolean found = false;
+            Set intfs = info.getInterfaces();
+            for (Iterator it = intfs.iterator(); it.hasNext();) {
+                String intf = (String) it.next();
+                if (intf.equals(JettyWebConnector.class.getName())) {
+                    found = true;
+                }
+            }
+            if (!found) {
+                throw new GBeanNotFoundException(name);
+            }
+            ObjectName config = Util.getConfiguration(kernel, name);
+            kernel.invoke(config, "removeGBean", new Object[]{name}, new String[]{ObjectName.class.getName()});
+        } catch (GBeanNotFoundException e) {
+            log.warn("No such GBean '" + objectName + "'"); //todo: what if we want to remove a failed GBean?
+        } catch (Exception e) {
+            log.error(e);
+        }
+    }
+
+    /**
+     * Gets the ObjectNames of any existing connectors for the specified
+     * protocol.
+     *
+     * @param protocol A protocol as returned by getSupportedProtocols
+     */
+    public String[] getConnectors(String protocol) {
+        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
+        Set names = kernel.listGBeans(query);
+        List result = new ArrayList();
+        for (Iterator it = names.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            try {
+                if (kernel.getAttribute(name, "protocol").equals(protocol)) {
+                    result.add(name.getCanonicalName());
+                }
+            } catch (Exception e) {
+                log.error("Unable to check the protocol for a connector", e);
+            }
+        }
+        return (String[]) result.toArray(new String[result.size()]);
+    }
+
+    /**
+     * Gets the ObjectNames of any existing connectors.
+     */
+    public String[] getConnectors() {
+        GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
+        Set names = kernel.listGBeans(query);
+        String[] result = new String[names.size()];
+        int i = 0;
+        for (Iterator it = names.iterator(); it.hasNext();) {
+            ObjectName name = (ObjectName) it.next();
+            result[i++] = name.getCanonicalName();
+        }
+        return result;
+    }
+
+    public String[] getConnectorsForContainer(String containerObjectName, String protocol) {
+        if(protocol == null) {
+            return getConnectorsForContainer(containerObjectName);
+        }
+        try {
+            ObjectName containerName = ObjectName.getInstance(containerObjectName);
+            List results = new ArrayList();
+            GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
+            Set set = kernel.listGBeans(query); // all Jetty connectors
+            for (Iterator it = set.iterator(); it.hasNext();) {
+                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
+                GBeanData data = kernel.getGBeanData(name);
+                Set refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
+                for (Iterator refit = refs.iterator(); refit.hasNext();) {
+                    ObjectName ref = (ObjectName) refit.next();
+                    boolean match = false;
+                    if(ref.isPattern()) {
+                        Set matches = kernel.listGBeans(ref);
+                        if(matches.size() != 1) {
+                            log.error("Unable to compare a connector->container reference that's a pattern to a fixed container name: "+ref.getCanonicalName());
+                        } else {
+                            ref = (ObjectName)matches.iterator().next();
+                            if(ref.equals(containerName)) {
+                                match = true;
+                            }
+                        }
+                    } else {
+                        if(ref.equals(containerName)) {
+                            match = true;
+                        }
+                    }
+                    if(match) {
+                        try {
+                            String testProtocol = (String) kernel.getAttribute(name, "protocol");
+                            if(testProtocol != null && testProtocol.equals(protocol)) {
+                                results.add(name.getCanonicalName());
+                            }
+                        } catch (Exception e) {
+                            log.error("Unable to look up protocol for connector '"+name+"'",e);
+                        }
+                        break;
+                    }
+                }
+            }
+            return (String[]) results.toArray(new String[results.size()]);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("Unable to look up connectors for Jetty container '"+containerObjectName+"': "+e);
+        }
+    }
+
+    public String[] getConnectorsForContainer(String containerObjectName) {
+        try {
+            ObjectName containerName = ObjectName.getInstance(containerObjectName);
+            List results = new ArrayList();
+            GBeanQuery query = new GBeanQuery(null, JettyWebConnector.class.getName());
+            Set set = kernel.listGBeans(query); // all Jetty connectors
+            for (Iterator it = set.iterator(); it.hasNext();) {
+                ObjectName name = (ObjectName) it.next(); // a single Jetty connector
+                GBeanData data = kernel.getGBeanData(name);
+                Set refs = data.getReferencePatterns(JettyConnector.CONNECTOR_CONTAINER_REFERENCE);
+                for (Iterator refit = refs.iterator(); refit.hasNext();) {
+                    ObjectName ref = (ObjectName) refit.next();
+                    if(ref.isPattern()) {
+                        Set matches = kernel.listGBeans(ref);
+                        if(matches.size() != 1) {
+                            log.error("Unable to compare a connector->container reference that's a pattern to a fixed container name: "+ref.getCanonicalName());
+                        } else {
+                            ref = (ObjectName)matches.iterator().next();
+                            if(ref.equals(containerName)) {
+                                results.add(name.getCanonicalName());
+                                break;
+                            }
+                        }
+                    } else {
+                        if(ref.equals(containerName)) {
+                            results.add(name.getCanonicalName());
+                            break;
+                        }
+                    }
+                }
+            }
+            return (String[]) results.toArray(new String[results.size()]);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("Unable to look up connectors for Jetty container '"+containerObjectName+"': "+e);
+        }
+    }
+
+    private ObjectName getConnectorName(ObjectName container, String protocol, String uniqueName) {
+        Hashtable table = new Hashtable();
+        table.put(NameFactory.J2EE_APPLICATION, container.getKeyProperty(NameFactory.J2EE_APPLICATION));
+        table.put(NameFactory.J2EE_SERVER, container.getKeyProperty(NameFactory.J2EE_SERVER));
+        table.put(NameFactory.J2EE_MODULE, container.getKeyProperty(NameFactory.J2EE_MODULE));
+        table.put(NameFactory.J2EE_TYPE, container.getKeyProperty(NameFactory.J2EE_TYPE));
+        table.put(NameFactory.J2EE_NAME, "JettyWebConnector-" + protocol + "-" + uniqueName);
+        try {
+            return ObjectName.getInstance(container.getDomain(), table);
+        } catch (MalformedObjectNameException e) {
+            throw new IllegalStateException("Never should have failed: " + e.getMessage());
+        }
+    }
+
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty Web Manager", JettyManagerImpl.class);
+        infoFactory.addAttribute("kernel", Kernel.class, false);
+        infoFactory.addInterface(WebManager.class);
+        infoFactory.setConstructor(new String[] {"kernel"});
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+}

Propchange: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/AJP13Connector.java Mon Sep  5 10:10:49 2005
@@ -20,7 +20,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.jetty.JettyContainer;
-import org.apache.geronimo.management.geronimo.WebContainer;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.mortbay.http.ajp.AJP13Listener;
 
 /**
@@ -32,7 +32,7 @@
     }
 
     public String getProtocol() {
-        return WebContainer.PROTOCOL_AJP;
+        return WebManager.PROTOCOL_AJP;
     }
 
     public int getDefaultPort() {

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPConnector.java Mon Sep  5 10:10:49 2005
@@ -20,7 +20,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.jetty.JettyContainer;
-import org.apache.geronimo.management.geronimo.WebContainer;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.mortbay.http.SocketListener;
 
 /**
@@ -32,7 +32,7 @@
     }
 
     public String getProtocol() {
-        return WebContainer.PROTOCOL_HTTP;
+        return WebManager.PROTOCOL_HTTP;
     }
 
     public int getDefaultPort() {

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java Mon Sep  5 10:10:49 2005
@@ -24,7 +24,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.management.geronimo.WebContainer;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.jetty.JettySecureConnector;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
@@ -51,7 +51,7 @@
     }
 
     public String getProtocol() {
-        return WebContainer.PROTOCOL_HTTPS;
+        return WebManager.PROTOCOL_HTTPS;
     }
 
     public String getKeystoreFileName() {

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java Mon Sep  5 10:10:49 2005
@@ -29,6 +29,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.http.HttpListener;
 import org.mortbay.http.SocketListener;
+import org.mortbay.http.ajp.AJP13Listener;
 import org.mortbay.util.ThreadedServer;
 
 /**
@@ -37,6 +38,7 @@
  * @version $Rev$ $Date$
  */
 public abstract class JettyConnector implements GBeanLifecycle, JettyWebConnector {
+    public final static String CONNECTOR_CONTAINER_REFERENCE = "JettyContainer";
     private final JettyContainer container;
     protected final HttpListener listener;
     private String connectHost;
@@ -141,63 +143,35 @@
         if(listener instanceof SocketListener) {
             SocketListener socketListener = (SocketListener)listener;
             socketListener.setBufferSize(bytes);
+        } else if(listener instanceof AJP13Listener) {
+            ((AJP13Listener)listener).setBufferSize(bytes);
         } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
+            throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName()); //todo: can this happen?
         }
     }
 
     public int getAcceptQueueSize() {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            return socketListener.getAcceptQueueSize();
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        return ((ThreadedServer)listener).getAcceptQueueSize();
     }
 
     public void setAcceptQueueSize(int size) {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            socketListener.setAcceptQueueSize(size);
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        ((ThreadedServer)listener).setAcceptQueueSize(size);
     }
 
     public int getLingerMillis() {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            return socketListener.getLingerTimeSecs()*1000;
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        return ((ThreadedServer)listener).getLingerTimeSecs()*1000;
     }
 
     public void setLingerMillis(int millis) {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            socketListener.setLingerTimeSecs(Math.round((float)millis/1000f));
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        ((ThreadedServer)listener).setLingerTimeSecs(Math.round((float)millis/1000f));
     }
 
     public boolean isTcpNoDelay() {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            return socketListener.getTcpNoDelay();
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        return ((ThreadedServer)listener).getTcpNoDelay();
     }
 
     public void setTcpNoDelay(boolean enable) {
-        if(listener instanceof SocketListener) {
-            SocketListener socketListener = (SocketListener)listener;
-            socketListener.setTcpNoDelay(enable);
-        } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
-        }
+        ((ThreadedServer)listener).setTcpNoDelay(enable);
     }
 
     public int getRedirectPort() {
@@ -211,8 +185,14 @@
             socketListener.setIntegralPort(port);
             socketListener.setIntegralScheme("https");
             socketListener.setConfidentialScheme("https");
+        } else if(listener instanceof AJP13Listener) {
+            AJP13Listener ajpListener = (AJP13Listener) listener;
+            ajpListener.setConfidentialPort(port);
+            ajpListener.setIntegralPort(port);
+            ajpListener.setIntegralScheme("https");
+            ajpListener.setConfidentialScheme("https");
         } else {
-            throw new UnsupportedOperationException(); //todo: can this happen?
+            throw new UnsupportedOperationException(listener == null ? "No Listener" : listener.getClass().getName()); //todo: can this happen?
         }
     }
 
@@ -252,7 +232,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty HTTP Connector", JettyConnector.class);
-        infoFactory.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, JettyContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addInterface(JettyWebConnector.class, new String[]{"host", "port", "minThreads","maxThreads","bufferSizeBytes","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","connectUrl",},
                                                           new String[]{"host", "port", "redirectPort"});
         infoFactory.setConstructor(new String[] {"JettyContainer"});

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java Mon Sep  5 10:10:49 2005
@@ -243,6 +243,13 @@
     Object invoke(ObjectName objectName, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
 
     /**
+     * Assuming the argument represents a service running in the kernel,
+     * returns an ObjectName for it.  If the argument is not a service or the
+     * kernel cannot produce an ObjectName for it, returns null.
+     */
+    ObjectName getObjectNameFor(Object service);
+
+    /**
      * Brings the kernel online
      * @throws Exception if the kernel can not boot
      */

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java Mon Sep  5 10:10:49 2005
@@ -156,12 +156,16 @@
     public void shutdown() {
         kernel.shutdown();
     }
-    
+
+    public ObjectName getObjectNameFor(Object service) {
+        return kernel.getObjectNameFor(service);
+    }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(KernelGBean.class);
-        infoFactory.addInterface(KernelGBean.class);
+        infoFactory.addInterface(Kernel.class);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.setConstructor(new String[]{"kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java Mon Sep  5 10:10:49 2005
@@ -316,6 +316,11 @@
         return results;
     }
 
+    public ObjectName getObjectNameFor(Object service) {
+        if(!running) {return null;}
+        return proxyManager.getProxyTarget(service);
+    }
+
     /**
      * Boot this Kernel, triggering the instantiation of the MBeanServer and DependencyManager,
      * and the registration of ConfigurationStore

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java Mon Sep  5 10:10:49 2005
@@ -286,6 +286,10 @@
         }
     }
 
+    public ObjectName getObjectNameFor(Object service) {
+        return proxyManager.getProxyTarget(service);
+    }
+
     public boolean isRunning() {
         return ((Boolean) getKernelAttribute("running")).booleanValue();
     }

Copied: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBManager.java (from r267473, geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBContainer.java)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBManager.java?p2=geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBManager.java&p1=geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBContainer.java&r1=267473&r2=278800&rev=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBContainer.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/EJBManager.java Mon Sep  5 10:10:49 2005
@@ -19,7 +19,7 @@
 /**
  * @version $Rev: 46228 $ $Date: 2004-09-16 21:21:04 -0400 (Thu, 16 Sep 2004) $
  */
-public interface EJBContainer extends NetworkContainer {
+public interface EJBManager extends NetworkManager {
     public final static String PROTOCOL_RMI = "RMI";
     public final static String PROTOCOL_IIOP = "IIOP";
     public final static String PROTOCOL_HTTP = "HTTP";

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/J2EEServer.java Mon Sep  5 10:10:49 2005
@@ -30,7 +30,7 @@
      *
      * @return The ObjectName of the web container, in String form.
      */
-    public String getWebContainer();
+    public String[] getWebManagers();
 
     /**
      * Gets the ObjectName of the EJB Container associated with this
@@ -39,7 +39,7 @@
      *
      * @return The ObjectName of the EJB container, in String form.
      */
-    public String getEJBContainer();
+    public String[] getEJBManagers();
 
     /**
      * Gets the ObjectName of the JMS Manager associated with this
@@ -48,7 +48,7 @@
      *
      * @return The ObjectName of the JMS Manager, in String form.
      */
-    public String getJMSManager();
+    public String[] getJMSManagers();
 
     /**
      * Gets the ObjectNames of the thread pools associated with this

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSBroker.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSBroker.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSBroker.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSBroker.java Mon Sep  5 10:10:49 2005
@@ -22,12 +22,4 @@
  * @version $Rev: 233346 $ $Date: 2005-08-18 14:08:26 -0400 (Thu, 18 Aug 2005) $
  */
 public interface JMSBroker {
-    /**
-     * Gets the ObjectNames of the network connectors associated with this
-     * JMS broker.
-     *
-     * @return The ObjectNames of the network connectors, in String form.
-     */
-    public String[] getConnectors();
-
 }

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSManager.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSManager.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JMSManager.java Mon Sep  5 10:10:49 2005
@@ -26,45 +26,22 @@
  *
  * @version $Rev: 46228 $ $Date: 2004-09-16 21:21:04 -0400 (Thu, 16 Sep 2004) $
  */
-public interface JMSManager extends NetworkContainer {
-    /**
-     * Gets the ObjectNames of any JMS servers/brokers running in the current
-     * Geronimo instance.
-     *
-     * @return The ObjectName of any brokers available for this JMS
-     *         implementation (in String form).
-     */
-    public String[] getBrokers();
-
-    /**
-     * Gets the ObjectNames of any existing connectors for the specified
-     * protocol associated with the specified broker.
-     *
-     * @param brokerObjectName The ObjectName of the broker to get connectors
-     *        for
-     * @param protocol A protocol as returned by getSupportedProtocols
-     */
-    public String[] getBrokerConnectors(String brokerObjectName, String protocol);
-
-    /**
-     * Gets the ObjectNames of any existing connectors associated with the
-     * specified broker.
-     */
-    public String[] getBrokerConnectors(String brokerObjectName);
-
+public interface JMSManager extends NetworkManager {
     /**
      * Creates a new connector, and returns the ObjectName for it.  Note that
      * the connector may well require further customization before being fully
      * functional (e.g. SSL settings for a secure connector).
      *
-     * @param broker     The ObjectName of the broker to add the connector for
-     * @param uniqueName A name fragment that's unique to this connector
-     * @param protocol   The protocol the connector should be configured for
-     * @param host       The listen host/IP for the connector
-     * @param port       The listen port for the connector
+     * @param brokerObjectName The ObjectName of the broker to add the
+     *                         connector for
+     * @param uniqueName       A name fragment that's unique to this connector
+     * @param protocol         The protocol the connector should be configured
+     *                         for
+     * @param host             The listen host/IP for the connector
+     * @param port             The listen port for the connector
      *
      * @return The ObjectName of the newly added connector.  It will be valid
      *         (loaded) but not started.
      */
-    public String addConnector(String broker, String uniqueName, String protocol, String host, int port);
+    public String addConnector(String brokerObjectName, String uniqueName, String protocol, String host, int port);
 }

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JVM.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JVM.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JVM.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/JVM.java Mon Sep  5 10:10:49 2005
@@ -26,9 +26,6 @@
  * @version $Rev$ $Date$
  */
 public interface JVM extends org.apache.geronimo.management.JVM {
-    long getFreeMemory();
-    long getTotalMemory();
-    long getMaxMemory();
     int getAvailableProcessors();
 
     /**

Copied: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkManager.java (from r267473, geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkContainer.java)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkManager.java?p2=geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkManager.java&p1=geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkContainer.java&r1=267473&r2=278800&rev=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkContainer.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/NetworkManager.java Mon Sep  5 10:10:49 2005
@@ -17,12 +17,21 @@
 package org.apache.geronimo.management.geronimo;
 
 /**
- * Base management interface for a server component that has associated
- * network connectors.
+ * Base management interface for a network technology with associated
+ * containers and connectors.  Examples might be Web, EJB, JMS (all
+ * of which have the concept of containers and connectors).  The container
+ * would be the Web Container, EJB Container, or JMS Broker.  The connectors
+ * would be the services that expose those containers over the network, via
+ * HTTP, RMI, TCP, etc.
  *
  * @version $Rev: 46228 $ $Date: 2004-09-16 21:21:04 -0400 (Thu, 16 Sep 2004) $
  */
-public interface NetworkContainer {
+public interface NetworkManager {
+    /**
+     * Gets the network containers.
+     */
+    public String[] getContainers();
+
     /**
      * Gets the protocols which this container can configure connectors for.
      */
@@ -30,14 +39,14 @@
 
     /**
      * 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.
+     * from the server environment.  It must be a connector that uses this
+     * network technology.
      */
     public void removeConnector(String objectName);
 
     /**
-     * Gets the ObjectNames of any existing connectors for the specified
-     * protocol.
+     * Gets the ObjectNames of any existing connectors for this network
+     * technology for the specified protocol.
      *
      * @param protocol A protocol as returned by getSupportedProtocols
      */
@@ -45,7 +54,21 @@
 
     /**
      * Gets the ObjectNames of any existing connectors associated with this
-     * container.
+     * network technology.
      */
     public String[] getConnectors();
+
+    /**
+     * Gets the ObjectNames of any existing connectors for the specified
+     * container for the specified protocol.
+     *
+     * @param protocol A protocol as returned by getSupportedProtocols
+     */
+    public String[] getConnectorsForContainer(String containerObjectName, String protocol);
+
+    /**
+     * Gets the ObjectNames of any existing connectors for the specified
+     * container.
+     */
+    public String[] getConnectorsForContainer(String containerObjectName);
 }

Modified: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebContainer.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebContainer.java (original)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebContainer.java Mon Sep  5 10:10:49 2005
@@ -22,15 +22,5 @@
  *
  * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
  */
-public interface WebContainer extends NetworkContainer {
-    public final static String PROTOCOL_HTTP = "HTTP";
-    public final static String PROTOCOL_HTTPS = "HTTPS";
-    public final static String PROTOCOL_AJP = "AJP";
-
-    /**
-     * Creates a new connector, and returns the ObjectName for it.  Note that
-     * the connector may well require further customization before being fully
-     * functional (e.g. SSL settings for a secure connector).
-     */
-    public String addConnector(String uniqueName, String protocol, String host, int port);
+public interface WebContainer {
 }

Added: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebManager.java?rev=278800&view=auto
==============================================================================
--- geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebManager.java (added)
+++ geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebManager.java Mon Sep  5 10:10:49 2005
@@ -0,0 +1,47 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed 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.management.geronimo;
+
+/**
+ * Specialization of NetworkManager for web containers.
+ *
+ * @version $Rev: 46019 $ $Date: 2004-09-14 05:56:06 -0400 (Tue, 14 Sep 2004) $
+ */
+public interface WebManager extends NetworkManager {
+    public final static String PROTOCOL_HTTP = "HTTP";
+    public final static String PROTOCOL_HTTPS = "HTTPS";
+    public final static String PROTOCOL_AJP = "AJP";
+
+    /**
+     * Creates a new connector, and returns the ObjectName for it.  Note that
+     * the connector may well require further customization before being fully
+     * functional (e.g. SSL settings for a secure connector).  This may need
+     * to be done before starting the resulting connector.
+     *
+     * @param containerObjectName The ObjectName of the container that the
+     *                            connector should be added to
+     * @param uniqueName          A name fragment that's unique to this
+     *                            connector
+     * @param protocol            The protocol that the connector should use
+     * @param host                The host name or IP that the connector should
+     *                            listen on
+     * @param port                The port that the connector should listen on
+     *
+     * @return The ObjectName of the new connector.
+     */
+    public String addConnector(String containerObjectName, String uniqueName, String protocol, String host, int port);
+}

Propchange: geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/WebManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java?rev=278800&r1=278799&r2=278800&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java (original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ConnectorGBean.java Mon Sep  5 10:10:49 2005
@@ -30,15 +30,15 @@
 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.WebContainer;
+import org.apache.geronimo.management.geronimo.WebManager;
 
 /**
  * @version $Rev$ $Date$
  */
 public class ConnectorGBean extends BaseGBean implements GBeanLifecycle, ObjectRetriever, TomcatWebConnector {
-
     private static final Log log = LogFactory.getLog(ConnectorGBean.class);
-    
+    public final static String CONNECTOR_CONTAINER_REFERENCE = "TomcatContainer";
+
     protected final Connector connector;
     private final TomcatContainer container;
     private String name;
@@ -67,7 +67,7 @@
 
         // Convert Geronimo standard values to Tomcat standard values
         // Only AJP requires an explicit protocol setting
-        if(protocol != null && protocol.equals(WebContainer.PROTOCOL_AJP)) {
+        if(protocol != null && protocol.equals(WebManager.PROTOCOL_AJP)) {
             protocol = "AJP/1.3";
         } else {
             protocol = null;
@@ -110,9 +110,9 @@
         if(protocol == null) {
             return;
         }
-        if(protocol.equals(WebContainer.PROTOCOL_HTTPS)) {
+        if(protocol.equals(WebManager.PROTOCOL_HTTPS)) {
             throw new IllegalArgumentException("Use a HttpsConnectorGBean for an HTTPS connector");
-        } else if(!protocol.equals(WebContainer.PROTOCOL_HTTP) && !protocol.equals(WebContainer.PROTOCOL_AJP)) {
+        } else if(!protocol.equals(WebManager.PROTOCOL_HTTP) && !protocol.equals(WebManager.PROTOCOL_AJP)) {
             throw new IllegalArgumentException("Unrecognized protocol '"+protocol+"' (use the values of the PROTOCOL_* constants in WebConnector)");
         }
     }
@@ -147,9 +147,9 @@
     }
 
     public int getDefaultPort() {
-        return getProtocol().equals(WebContainer.PROTOCOL_AJP) ? -1 :
-                getProtocol().equals(WebContainer.PROTOCOL_HTTP) ? 80 :
-                getProtocol().equals(WebContainer.PROTOCOL_HTTPS) ? 443 : -1;
+        return getProtocol().equals(WebManager.PROTOCOL_AJP) ? -1 :
+                getProtocol().equals(WebManager.PROTOCOL_HTTP) ? 80 :
+                getProtocol().equals(WebManager.PROTOCOL_HTTPS) ? 443 : -1;
     }
 
     public String getConnectUrl() {
@@ -180,11 +180,11 @@
     public String getProtocol() {
         String protocol = connector.getProtocol();
         if(protocol.indexOf("AJP") > -1) {
-            return WebContainer.PROTOCOL_AJP;
+            return WebManager.PROTOCOL_AJP;
         } else if(connector.getScheme().equalsIgnoreCase("http")) {
-            return WebContainer.PROTOCOL_HTTP;
+            return WebManager.PROTOCOL_HTTP;
         } else if(connector.getScheme().equalsIgnoreCase("https")) {
-            return WebContainer.PROTOCOL_HTTPS;
+            return WebManager.PROTOCOL_HTTPS;
         }
         throw new IllegalStateException("Unknown protocol '"+protocol+"' and scheme '"+connector.getScheme()+"'");
     }
@@ -408,7 +408,7 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Tomcat Connector", ConnectorGBean.class);
         infoFactory.addAttribute("name", String.class, true);
         infoFactory.addAttribute("protocol", String.class, true);
-        infoFactory.addReference("TomcatContainer", TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference(CONNECTOR_CONTAINER_REFERENCE, TomcatContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addOperation("getInternalObject");
         infoFactory.addInterface(TomcatWebConnector.class, new String[]{"host","port","bufferSizeBytes","maxThreads","acceptQueueSize","lingerMillis","tcpNoDelay","redirectPort","minSpareThreads","maxSpareThreads","maxHttpHeaderSizeBytes","hostLookupEnabled","connectionTimeoutMillis","uploadTimeoutEnabled","connectUrl",},
                                                            new String[]{"host","port","redirectPort"});



Mime
View raw message