geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r556056 - in /geronimo/server/trunk: configs/activemq-broker/src/plan/plan.xml modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
Date Fri, 13 Jul 2007 16:29:46 GMT
Author: vamsic007
Date: Fri Jul 13 09:29:43 2007
New Revision: 556056

URL: http://svn.apache.org/viewvc?view=rev&rev=556056
Log:
GERONIMO-3320 ActiveMQ MBeans should get registered with MBeanServer created by Geronimo
  o Added MBeanServerReference to BrokerServiceGBeanImpl

Modified:
    geronimo/server/trunk/configs/activemq-broker/src/plan/plan.xml
    geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java

Modified: geronimo/server/trunk/configs/activemq-broker/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/activemq-broker/src/plan/plan.xml?view=diff&rev=556056&r1=556055&r2=556056
==============================================================================
--- geronimo/server/trunk/configs/activemq-broker/src/plan/plan.xml (original)
+++ geronimo/server/trunk/configs/activemq-broker/src/plan/plan.xml Fri Jul 13 09:29:43 2007
@@ -42,6 +42,9 @@
         <reference name="serverInfo">
             <name>ServerInfo</name>
         </reference>
+        <reference name="mbeanServerReference">
+            <name>MBeanServerReference</name>
+        </reference>
     </gbean>
 
     <gbean name="ActiveMQ.tcp.default" class="org.apache.geronimo.activemq.TransportConnectorGBeanImpl">

Modified: geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java?view=diff&rev=556056&r1=556055&r2=556056
==============================================================================
--- geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/BrokerServiceGBeanImpl.java
Fri Jul 13 09:29:43 2007
@@ -36,6 +36,7 @@
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.management.geronimo.JMSManager;
 import org.apache.geronimo.management.geronimo.NetworkConnector;
+import org.apache.geronimo.system.jmx.MBeanServerReference;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 /**
@@ -57,6 +58,7 @@
     private String objectName;
     private JMSManager manager;
     private boolean useShutdownHook;
+    private MBeanServerReference mbeanServerReference;
 
     public BrokerServiceGBeanImpl() {
     }
@@ -64,6 +66,10 @@
     public synchronized BrokerService getBrokerContainer() {
         return brokerService;
     }
+    
+    public void setMbeanServerReference(MBeanServerReference mbeanServerReference) {
+        this.mbeanServerReference = mbeanServerReference;
+    }
 
     public synchronized void doStart() throws Exception {
         ClassLoader old = Thread.currentThread().getContextClassLoader();
@@ -86,7 +92,7 @@
             }
             
             // Do not allow creation of another ConnectorServer
-            ManagementContext mgmtctx = new ManagementContext();
+            ManagementContext mgmtctx = new ManagementContext(mbeanServerReference != null
? mbeanServerReference.getMBeanServer() : null);
             mgmtctx.setCreateConnector(false);
             brokerService.setManagementContext(mgmtctx);
 
@@ -142,6 +148,7 @@
     static {
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("ActiveMQ Message Broker", BrokerServiceGBeanImpl.class,
"JMSServer");
         infoBuilder.addReference("serverInfo", ServerInfo.class);
+        infoBuilder.addReference("mbeanServerReference", MBeanServerReference.class);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
         infoBuilder.addAttribute("brokerName", String.class, true);
         infoBuilder.addAttribute("brokerUri", String.class, true);



Mime
View raw message