geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: svn commit: r354721 - in /geronimo/trunk: assemblies/j2ee-tomcat-server/ etc/ modules/assembly/ modules/assembly/src/plan/ modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/ modules/tomcat-builder/src/schema/ modules/tomcat/ modules...
Date Wed, 07 Dec 2005 18:21:39 GMT
Unless there is going to be a non-snapshot WADI release available by  
the end of today I am -1 on including this in geronimo 1.0.

thanks
david jencks

On Dec 6, 2005, at 9:38 PM, jgenender@apache.org wrote:

> Author: jgenender
> Date: Tue Dec  6 21:37:45 2005
> New Revision: 354721
>
> URL: http://svn.apache.org/viewcvs?rev=354721&view=rev
> Log:
> Added manager to Tomcat and WADI
>
> Added:
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> ManagerGBean.java
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> cluster/WADIGBean.java
> Modified:
>     geronimo/trunk/assemblies/j2ee-tomcat-server/project.xml
>     geronimo/trunk/etc/project.properties
>     geronimo/trunk/modules/assembly/project.xml
>     geronimo/trunk/modules/assembly/src/plan/j2ee-tomcat-plan.xml
>      
> geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/ 
> tomcat/deployment/TomcatModuleBuilder.java
>      
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat 
> -1.0.xsd
>      
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat- 
> config-1.0.xsd
>     geronimo/trunk/modules/tomcat/project.xml
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> EngineGBean.java
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> GeronimoStandardContext.java
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> HostGBean.java
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatContext.java
>      
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatWebAppContext.java
>
> Modified: geronimo/trunk/assemblies/j2ee-tomcat-server/project.xml
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/assemblies/j2ee-tomcat- 
> server/project.xml?rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> --- geronimo/trunk/assemblies/j2ee-tomcat-server/project.xml (original)
> +++ geronimo/trunk/assemblies/j2ee-tomcat-server/project.xml Tue Dec   
> 6 21:37:45 2005
> @@ -954,6 +954,20 @@
>              <url>http://jakarta.apache.org/tomcat/</url>
>          </dependency>
>
> +        <!-- WADI -->
> +        <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-core</artifactId>
> +            <version>${wadi_version}</version>
> +            <url>http://wadi.codehaus.org/</url>
> +        </dependency>
> +        <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-tomcat55</artifactId>
> +            <version>${wadi_version}</version>
> +            <url>http://wadi.codehaus.org/</url>
> +        </dependency>
> +
>  <!-- jasper -->
>          <dependency>
>              <groupId>tomcat</groupId>
>
> Modified: geronimo/trunk/etc/project.properties
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/etc/project.properties? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> --- geronimo/trunk/etc/project.properties (original)
> +++ geronimo/trunk/etc/project.properties Tue Dec  6 21:37:45 2005
> @@ -170,6 +170,7 @@
>  stax_api_version=1.0
>  tomcat_ajp_version=5.5.12
>  tomcat_version=5.5.12
> +wadi_version=2.0-SNAPSHOT
>  velocity_version=1.4
>  wsdl4j_version=1.5.2
>  xerces_version=2.6.2
>
> Modified: geronimo/trunk/modules/assembly/project.xml
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/ 
> project.xml?rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> --- geronimo/trunk/modules/assembly/project.xml (original)
> +++ geronimo/trunk/modules/assembly/project.xml Tue Dec  6 21:37:45  
> 2005
> @@ -1068,6 +1068,24 @@
>              </properties>
>          </dependency>
>          <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-core</artifactId>
> +            <version>${wadi_version}</version>
> +            <url>http://wadi.codehaus.org</url>
> +            <properties>
> +                <repository>true</repository>
> +            </properties>
> +        </dependency>
> +        <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-tomcat55</artifactId>
> +            <version>${wadi_version}</version>
> +            <url>http://wadi.codehaus.org</url>
> +            <properties>
> +                <repository>true</repository>
> +            </properties>
> +        </dependency>
> +        <dependency>
>              <groupId>tomcat</groupId>
>              <artifactId>servlets-default</artifactId>
>              <version>${tomcat_version}</version>
>
> Modified: geronimo/trunk/modules/assembly/src/plan/j2ee-tomcat-plan.xml
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/ 
> plan/j2ee-tomcat-plan.xml?rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> --- geronimo/trunk/modules/assembly/src/plan/j2ee-tomcat-plan.xml  
> (original)
> +++ geronimo/trunk/modules/assembly/src/plan/j2ee-tomcat-plan.xml Tue  
> Dec  6 21:37:45 2005
> @@ -93,6 +93,12 @@
>      <dependency>
>          <uri>commons-el/commons-el/${commons_el_version}/jar</uri>
>      </dependency>
> +    <dependency>
> +        <uri>wadi/wadi-core/${wadi_version}/jar</uri>
> +    </dependency>
> +    <dependency>
> +        <uri>wadi/wadi-tomcat55/${wadi_version}/jar</uri>
> +    </dependency>
>
>      <gbean name="TomcatResources"  
> class="org.apache.geronimo.system.util.DirectoryInitializationGBean">
>          <!-- copies tomcat initialization files into specified  
> location -->
>
> Modified:  
> geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/ 
> tomcat/deployment/TomcatModuleBuilder.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/ 
> src/java/org/apache/geronimo/tomcat/deployment/ 
> TomcatModuleBuilder.java?rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/ 
> tomcat/deployment/TomcatModuleBuilder.java (original)
> +++  
> geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/ 
> tomcat/deployment/TomcatModuleBuilder.java Tue Dec  6 21:37:45 2005
> @@ -80,6 +80,7 @@
>  import org.apache.geronimo.security.deployment.SecurityConfiguration;
>  import org.apache.geronimo.security.jacc.ComponentPermissions;
>  import org.apache.geronimo.security.util.URLPattern;
> +import org.apache.geronimo.tomcat.ManagerGBean;
>  import org.apache.geronimo.tomcat.RealmGBean;
>  import org.apache.geronimo.tomcat.TomcatClassLoader;
>  import org.apache.geronimo.tomcat.TomcatWebAppContext;
> @@ -475,6 +476,11 @@
>                  webModuleData.setReferencePattern("Cluster",  
> clusterName);
>              }
>
> +            if (tomcatWebApp.isSetManager()) {
> +                String manager = tomcatWebApp.getManager().trim();
> +                ObjectName managerName =  
> NameFactory.getComponentName(null, null, null, null, manager,  
> ManagerGBean.J2EE_TYPE, moduleJ2eeContext);
> +                webModuleData.setReferencePattern("Manager",  
> managerName);
> +            }
>              Map portMap = webModule.getPortMap();
>
>              //Handle the role permissions and webservices on the  
> servlets.
>
> Modified:  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat 
> -1.0.xsd
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/ 
> src/schema/geronimo-tomcat-1.0.xsd? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat 
> -1.0.xsd (original)
> +++  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat 
> -1.0.xsd Tue Dec  6 21:37:45 2005
> @@ -49,6 +49,7 @@
>              <xs:element name="cross-context" type="tomcat:emptyType"  
> minOccurs="0"/>
>              <xs:element name="valve-chain" type="xs:string"  
> minOccurs="0"/>
>              <xs:element name="tomcat-realm" type="xs:string"  
> minOccurs="0"/>
> +            <xs:element name="manager" type="xs:string"  
> minOccurs="0"/>
>              <xs:element name="cluster" type="xs:string"  
> minOccurs="0"/>
>
>              <xs:group ref="naming:jndiEnvironmentRefsGroup"/>
>
> Modified:  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat- 
> config-1.0.xsd
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/ 
> src/schema/geronimo-tomcat-config-1.0.xsd? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat- 
> config-1.0.xsd (original)
> +++  
> geronimo/trunk/modules/tomcat-builder/src/schema/geronimo-tomcat- 
> config-1.0.xsd Tue Dec  6 21:37:45 2005
> @@ -32,6 +32,7 @@
>              <xs:element name="cross-context" type="tomcat:emptyType"  
> minOccurs="0"/>
>              <xs:element name="valve-chain" type="xs:string"  
> minOccurs="0"/>
>              <xs:element name="tomcat-realm" type="xs:string"  
> minOccurs="0"/>
> +            <xs:element name="manager" type="xs:string"  
> minOccurs="0"/>
>              <xs:element name="cluster" type="xs:string"  
> minOccurs="0"/>
>          </xs:sequence>
>      </xs:complexType>
>
> Modified: geronimo/trunk/modules/tomcat/project.xml
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/ 
> project.xml?rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> --- geronimo/trunk/modules/tomcat/project.xml (original)
> +++ geronimo/trunk/modules/tomcat/project.xml Tue Dec  6 21:37:45 2005
> @@ -61,11 +61,6 @@
>               <artifactId>concurrent</artifactId>
>               <version>${concurrent_version}</version>
>           </dependency>
> -        <dependency>
> -            <groupId>geronimo</groupId>
> -            <artifactId>geronimo-jetty-builder</artifactId>
> -            <version>${pom.currentVersion}</version>
> -        </dependency>
>
>          <!-- Used for preprocessing our plans -->
>          <dependency>
> @@ -386,6 +381,22 @@
>              <groupId>mx4j</groupId>
>              <artifactId>mx4j</artifactId>
>              <version>${mx4j_version}</version>
> +        </dependency>
> +        <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-core</artifactId>
> +            <version>${wadi_version}</version>
> +            <properties>
> +                 <geronimo.dependency>true</geronimo.dependency>
> +             </properties>
> +        </dependency>
> +        <dependency>
> +            <groupId>wadi</groupId>
> +            <artifactId>wadi-tomcat55</artifactId>
> +            <version>${wadi_version}</version>
> +            <properties>
> +                 <geronimo.dependency>true</geronimo.dependency>
> +             </properties>
>          </dependency>
>      </dependencies>
>  </project>
>
> Modified:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> EngineGBean.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/EngineGBean.java? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> EngineGBean.java (original)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> EngineGBean.java Tue Dec  6 21:37:45 2005
> @@ -22,6 +22,7 @@
>  import org.apache.catalina.Cluster;
>  import org.apache.catalina.Engine;
>  import org.apache.catalina.Host;
> +import org.apache.catalina.Manager;
>  import org.apache.catalina.Realm;
>  import org.apache.catalina.Valve;
>  import org.apache.catalina.core.StandardEngine;
> @@ -53,7 +54,8 @@
>              Collection hosts,
>              ObjectRetriever realmGBean,
>              ValveGBean tomcatValveChain,
> -            CatalinaClusterGBean clusterGBean) throws Exception {
> +            CatalinaClusterGBean clusterGBean,
> +            ManagerGBean manager) throws Exception {
>          super(); // TODO: make it an attribute
>
>          if (className == null){
> @@ -82,6 +84,9 @@
>          if (realmGBean != null){
>              engine.setRealm((Realm)realmGBean.getInternalObject());
>          }
> +
> +        if (manager != null)
> +            engine.setManager((Manager)manager.getInternalObject());
>
>          //Add the valve list
>          if (engine instanceof StandardEngine){
> @@ -164,6 +169,7 @@
>          infoFactory.addReference("RealmGBean", ObjectRetriever.class,  
> NameFactory.GERONIMO_SERVICE);
>          infoFactory.addReference("TomcatValveChain",  
> ValveGBean.class, ValveGBean.J2EE_TYPE);
>          infoFactory.addReference("CatalinaCluster",  
> CatalinaClusterGBean.class, CatalinaClusterGBean.J2EE_TYPE);
> +        infoFactory.addReference("Manager", ManagerGBean.class,  
> ManagerGBean.J2EE_TYPE);
>          infoFactory.addOperation("getInternalObject");
>          infoFactory.setConstructor(new String[] {
>                  "className",
> @@ -171,7 +177,8 @@
>                  "Hosts",
>                  "RealmGBean",
>                  "TomcatValveChain",
> -                "CatalinaCluster" });
> +                "CatalinaCluster",
> +                "Manager"});
>          GBEAN_INFO = infoFactory.getBeanInfo();
>      }
>
>
> Modified:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> GeronimoStandardContext.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/GeronimoStandardContext.java? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> GeronimoStandardContext.java (original)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> GeronimoStandardContext.java Tue Dec  6 21:37:45 2005
> @@ -28,6 +28,7 @@
>
>  import org.apache.catalina.Container;
>  import org.apache.catalina.LifecycleException;
> +import org.apache.catalina.Manager;
>  import org.apache.catalina.Valve;
>  import org.apache.catalina.Wrapper;
>  import org.apache.catalina.cluster.CatalinaCluster;
> @@ -168,6 +169,10 @@
>          CatalinaCluster cluster = ctx.getCluster();
>          if (cluster != null)
>              this.setCluster(cluster);
> +
> +        Manager manager = ctx.getManager();
> +        if (manager != null)
> +            this.setManager(manager);
>
>          pipelineInitialized = true;
>          this.webServiceMap = ctx.getWebServices();
>
> Modified:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> HostGBean.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/HostGBean.java? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> HostGBean.java (original)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> HostGBean.java Tue Dec  6 21:37:45 2005
> @@ -21,6 +21,7 @@
>  import java.util.Map;
>  import org.apache.catalina.Cluster;
>  import org.apache.catalina.Host;
> +import org.apache.catalina.Manager;
>  import org.apache.catalina.Realm;
>  import org.apache.catalina.Valve;
>  import org.apache.catalina.core.StandardHost;
> @@ -50,7 +51,8 @@
>              ArrayList aliases,
>              ObjectRetriever realmGBean,
>              ValveGBean tomcatValveChain,
> -            CatalinaClusterGBean clusterGBean) throws Exception {
> +            CatalinaClusterGBean clusterGBean,
> +            ManagerGBean manager) throws Exception {
>          super(); // TODO: make it an attribute
>
>          //Validate
> @@ -104,6 +106,10 @@
>          if (clusterGBean != null){
>               
> host.setCluster((Cluster)clusterGBean.getInternalObject());
>          }
> +
> +        //Add manager
> +        if (manager != null)
> +            host.setManager((Manager)manager.getInternalObject());
>      }
>
>      public Object getInternalObject() {
> @@ -132,6 +138,7 @@
>          infoFactory.addReference("RealmGBean", ObjectRetriever.class,  
> NameFactory.GERONIMO_SERVICE);
>          infoFactory.addReference("TomcatValveChain",  
> ValveGBean.class, ValveGBean.J2EE_TYPE);
>          infoFactory.addReference("CatalinaCluster",  
> CatalinaClusterGBean.class, CatalinaClusterGBean.J2EE_TYPE);
> +        infoFactory.addReference("Manager", ManagerGBean.class,  
> ManagerGBean.J2EE_TYPE);
>          infoFactory.addOperation("getInternalObject");
>          infoFactory.setConstructor(new String[] {
>                  "className",
> @@ -139,7 +146,8 @@
>                  "aliases",
>                  "RealmGBean",
>                  "TomcatValveChain",
> -                "CatalinaCluster" });
> +                "CatalinaCluster",
> +                "Manager"});
>          GBEAN_INFO = infoFactory.getBeanInfo();
>      }
>
>
> Added:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> ManagerGBean.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/ManagerGBean.java?rev=354721&view=auto
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> ManagerGBean.java (added)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> ManagerGBean.java Tue Dec  6 21:37:45 2005
> @@ -0,0 +1,86 @@
> +/**
> + *
> + * Copyright 2003-2005 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.tomcat;
> +
> +import java.util.Map;
> +
> +import org.apache.catalina.Manager;
> +import org.apache.commons.logging.Log;
> +import org.apache.commons.logging.LogFactory;
> +import org.apache.geronimo.gbean.GBeanInfo;
> +import org.apache.geronimo.gbean.GBeanInfoBuilder;
> +import org.apache.geronimo.gbean.GBeanLifecycle;
> +
> +public class ManagerGBean extends BaseGBean implements  
> GBeanLifecycle, ObjectRetriever{
> +
> +    private static final Log log =  
> LogFactory.getLog(ManagerGBean.class);
> +
> +    public static final String J2EE_TYPE = "Manager";
> +
> +    private final Manager manager;
> +
> +    public ManagerGBean(String className,
> +            Map initParams) throws Exception {
> +        super(); // TODO: make it an attribute
> +        //Validate
> +        if (className == null){
> +            className = "org.apache.catalina.core.StandardHost";
> +        }
> +
> +        if (initParams == null){
> +            throw new IllegalArgumentException("Must have a 'name'  
> value in initParams.");
> +        }
> +
> +        //Create the Manager object
> +        manager = (Manager)Class.forName(className).newInstance();
> +
> +        //Set the parameters
> +        setParameters(manager, initParams);
> +
> +    }
> +
> +    public void doStart() throws Exception {
> +    }
> +
> +    public void doStop() throws Exception {
> +    }
> +
> +    public void doFail() {
> +    }
> +
> +    public Object getInternalObject() {
> +        // TODO Auto-generated method stub
> +        return manager;
> +    }
> +
> +    public static final GBeanInfo GBEAN_INFO;
> +
> +    static {
> +        GBeanInfoBuilder infoFactory =  
> GBeanInfoBuilder.createStatic("TomcatManager", ManagerGBean.class,  
> J2EE_TYPE);
> +        infoFactory.addAttribute("className", String.class, true);
> +        infoFactory.addAttribute("initParams", Map.class, true);
> +        infoFactory.addOperation("getInternalObject");
> +        infoFactory.setConstructor(new String[] {
> +                "className",
> +                "initParams"});
> +        GBEAN_INFO = infoFactory.getBeanInfo();
> +    }
> +
> +    public static GBeanInfo getGBeanInfo() {
> +        return GBEAN_INFO;
> +    }
> +}
>
> Modified:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatContext.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/TomcatContext.java? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatContext.java (original)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatContext.java Tue Dec  6 21:37:45 2005
> @@ -21,6 +21,7 @@
>  import java.util.Set;
>
>  import org.apache.catalina.Context;
> +import org.apache.catalina.Manager;
>  import org.apache.catalina.Realm;
>  import org.apache.catalina.cluster.CatalinaCluster;
>  import org.apache.geronimo.kernel.Kernel;
> @@ -64,6 +65,8 @@
>      public List getValveChain();
>
>      public CatalinaCluster getCluster();
> +
> +    public Manager getManager();
>
>      public boolean isCrossContext();
>
>
> Modified:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatWebAppContext.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/TomcatWebAppContext.java? 
> rev=354721&r1=354720&r2=354721&view=diff
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatWebAppContext.java (original)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> TomcatWebAppContext.java Tue Dec  6 21:37:45 2005
> @@ -28,6 +28,7 @@
>  import javax.management.ObjectName;
>
>  import org.apache.catalina.Context;
> +import org.apache.catalina.Manager;
>  import org.apache.catalina.Realm;
>  import org.apache.catalina.Valve;
>  import org.apache.catalina.cluster.CatalinaCluster;
> @@ -79,6 +80,8 @@
>      private final List valveChain;
>
>      private final CatalinaCluster catalinaCluster;
> +
> +    private final Manager manager;
>
>      private final boolean crossContext;
>
> @@ -129,6 +132,7 @@
>              ObjectRetriever tomcatRealm,
>              ValveGBean tomcatValveChain,
>              CatalinaClusterGBean cluster,
> +            ManagerGBean manager,
>              boolean crossContext,
>              Map webServices,
>              J2EEServer server,
> @@ -200,6 +204,12 @@
>          else
>              catalinaCluster = null;
>
> +        //Add the manaer
> +        if (manager != null)
> +           this.manager = (Manager)manager.getInternalObject();
> +        else
> +            this.manager = null;
> +
>          this.crossContext = crossContext;
>
>          this.webServices = webServices;
> @@ -326,6 +336,10 @@
>          return catalinaCluster;
>      }
>
> +    public Manager getManager() {
> +        return manager;
> +    }
> +
>      public boolean isCrossContext() {
>          return crossContext;
>      }
> @@ -443,6 +457,7 @@
>          infoBuilder.addReference("TomcatRealm",  
> ObjectRetriever.class);
>          infoBuilder.addReference("TomcatValveChain",  
> ValveGBean.class);
>          infoBuilder.addReference("Cluster",  
> CatalinaClusterGBean.class);
> +        infoBuilder.addReference("Manager", ManagerGBean.class);
>          infoBuilder.addAttribute("crossContext", boolean.class, true);
>          infoBuilder.addAttribute("webServices", Map.class, true);
>          infoBuilder.addReference("J2EEServer", J2EEServer.class);
> @@ -472,6 +487,7 @@
>                  "TomcatRealm",
>                  "TomcatValveChain",
>                  "Cluster",
> +                "Manager",
>                  "crossContext",
>                  "webServices",
>                  "J2EEServer",
>
> Added:  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> cluster/WADIGBean.java
> URL:  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/ 
> org/apache/geronimo/tomcat/cluster/WADIGBean.java?rev=354721&view=auto
> ======================================================================= 
> =======
> ---  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> cluster/WADIGBean.java (added)
> +++  
> geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/ 
> cluster/WADIGBean.java Tue Dec  6 21:37:45 2005
> @@ -0,0 +1,47 @@
> +/**
> + *
> + * Copyright 2003-2005 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.tomcat.cluster;
> +
> +import java.util.Map;
> +
> +import org.apache.geronimo.gbean.GBeanInfo;
> +import org.apache.geronimo.gbean.GBeanInfoBuilder;
> +import org.apache.geronimo.tomcat.ManagerGBean;
> +
> +public class WADIGBean extends ManagerGBean {
> +
> +    public WADIGBean() throws Exception{
> +        super("org.codehaus.wadi.tomcat55.TomcatManager", null);
> +    }
> +
> +    public static final GBeanInfo GBEAN_INFO;
> +
> +    static {
> +        GBeanInfoBuilder infoFactory =  
> GBeanInfoBuilder.createStatic("TomcatManager", WADIGBean.class,  
> J2EE_TYPE);
> +        infoFactory.addAttribute("className", String.class, true);
> +        infoFactory.addAttribute("initParams", Map.class, true);
> +        infoFactory.addOperation("getInternalObject");
> +        infoFactory.setConstructor(new String[] {
> +                "className",
> +                "initParams"});
> +        GBEAN_INFO = infoFactory.getBeanInfo();
> +    }
> +
> +    public static GBeanInfo getGBeanInfo() {
> +        return GBEAN_INFO;
> +    }
> +}
>
>


Mime
View raw message