You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ak...@apache.org on 2007/05/04 18:01:59 UTC

svn commit: r535304 - /geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java

Author: akulshreshtha
Date: Fri May  4 09:01:58 2007
New Revision: 535304

URL: http://svn.apache.org/viewvc?view=rev&rev=535304
Log:
gGERONIMO-3011 Porting a fix from the trunk, Do not allow creation of ConnectorServer by activemq broker

Modified:
    geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java

Modified: geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java?view=diff&rev=535304&r1=535303&r2=535304
==============================================================================
--- geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java (original)
+++ geronimo/server/branches/1.2/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java Fri May  4 09:01:58 2007
@@ -24,6 +24,7 @@
 
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.jmx.ManagementContext;
 import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
 import org.apache.activemq.transport.TransportDisposedIOException;
 import org.apache.commons.logging.Log;
@@ -82,6 +83,11 @@
                     }
                 }
             }
+
+            // Do not allow creation of another ConnectorServer
+            ManagementContext mgmtctx = new ManagementContext();
+            mgmtctx.setCreateConnector(false);
+            brokerService.setManagementContext(mgmtctx);
 
             // Do not allow the broker to use a shutown hook, the kernel will stop it
             brokerService.setUseShutdownHook(isUseShutdownHook());