geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r554952 - in /geronimo/server/trunk: configs/tomcat6/src/plan/ modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/ modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/
Date Tue, 10 Jul 2007 14:07:17 GMT
Author: vamsic007
Date: Tue Jul 10 07:07:16 2007
New Revision: 554952

URL: http://svn.apache.org/viewvc?view=rev&rev=554952
Log:
GERONIMO-3273 Tomcat MBeans not getting registered with MBeanServer created by Geronimo
  o Adds MBeanServerReference to EngineGBean and sets geronimo MBeanServer for registering
Tomcat MBeans

Modified:
    geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/EngineGBean.java
    geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java

Modified: geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml?view=diff&rev=554952&r1=554951&r2=554952
==============================================================================
--- geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/tomcat6/src/plan/plan.xml Tue Jul 10 07:07:16 2007
@@ -134,6 +134,9 @@
         <reference name="TomcatValveChain">
             <name>FirstValve</name>
         </reference>
+        <reference name="MBeanServerReference">
+            <name>MBeanServerReference</name>
+        </reference>
         <dependency>
             <name>TomcatResources</name>
         </dependency>

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/EngineGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/EngineGBean.java?view=diff&rev=554952&r1=554951&r2=554952
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/EngineGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/main/java/org/apache/geronimo/tomcat/EngineGBean.java
Tue Jul 10 07:07:16 2007
@@ -37,7 +37,9 @@
 import org.apache.geronimo.gbean.ReferenceCollectionEvent;
 import org.apache.geronimo.gbean.ReferenceCollectionListener;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.system.jmx.MBeanServerReference;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
+import org.apache.tomcat.util.modeler.Registry;
 
 /**
  * @version $Rev$ $Date$
@@ -59,7 +61,8 @@
             ValveGBean tomcatValveChain,
             LifecycleListenerGBean listenerChain,
             CatalinaClusterGBean clusterGBean,
-            ManagerGBean manager) throws Exception {
+            ManagerGBean manager,
+            MBeanServerReference mbeanServerReference) throws Exception {
         super(); // TODO: make it an attribute
 
         if (className == null){
@@ -122,6 +125,10 @@
                 }
             }
         }
+
+        if(mbeanServerReference != null) {
+            Registry.setServer(mbeanServerReference.getMBeanServer());
+        }
         
         //Add the hosts
         if (hosts instanceof ReferenceCollection) {
@@ -204,6 +211,7 @@
         infoFactory.addReference("LifecycleListenerChain", LifecycleListenerGBean.class,
LifecycleListenerGBean.J2EE_TYPE);
         infoFactory.addReference("CatalinaCluster", CatalinaClusterGBean.class, CatalinaClusterGBean.J2EE_TYPE);
         infoFactory.addReference("Manager", ManagerGBean.class, ManagerGBean.J2EE_TYPE);
+        infoFactory.addReference("MBeanServerReference", MBeanServerReference.class);
         infoFactory.addOperation("getInternalObject");
         infoFactory.setConstructor(new String[] { 
                 "className", 
@@ -214,7 +222,8 @@
                 "TomcatValveChain",
                 "LifecycleListenerChain",
                 "CatalinaCluster",
-                "Manager"});
+                "Manager",
+                "MBeanServerReference"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?view=diff&rev=554952&r1=554951&r2=554952
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat6/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Tue Jul 10 07:07:16 2007
@@ -178,6 +178,7 @@
                 null,
                 null,
                 null,
+                null,
                 null);
         engine.doStart();
 



Mime
View raw message