activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r386603 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Date Fri, 17 Mar 2006 10:38:03 GMT
Author: aco
Date: Fri Mar 17 02:38:02 2006
New Revision: 386603

URL: http://svn.apache.org/viewcvs?rev=386603&view=rev
Log:
- Perform the actual setup of the connectors when it is actually started.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java?rev=386603&r1=386602&r2=386603&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java
Fri Mar 17 02:38:02 2006
@@ -154,18 +154,6 @@
      */
     public TransportConnector addConnector(TransportConnector connector) throws Exception
{
         
-        connector.setBroker(getBroker());
-        connector.setBrokerName(getBrokerName());
-        connector.setTaskRunnerFactory(getTaskRunnerFactory());
-        MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy();
-        if (policy != null) {
-            connector.setMessageAuthorizationPolicy(policy);
-        }
-        
-        if (isUseJmx()) {
-            connector = connector.asManagedConnector(getManagementContext().getMBeanServer(),
getBrokerObjectName());
-            registerConnectorMBean(connector);
-        }        
         transportConnectors.add(connector);
 
         return connector;
@@ -1056,7 +1044,7 @@
         if (!isSlave()){
             for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
                 TransportConnector connector = (TransportConnector) iter.next();
-                connector.start();
+                startTransportConnector(connector);
             }
 
             for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
@@ -1076,6 +1064,22 @@
                 connector.start();
             }
             }
+    }
+
+    protected void startTransportConnector(TransportConnector connector) throws Exception
{
+        connector.setBroker(getBroker());
+        connector.setBrokerName(getBrokerName());
+        connector.setTaskRunnerFactory(getTaskRunnerFactory());
+        MessageAuthorizationPolicy policy = getMessageAuthorizationPolicy();
+        if (policy != null) {
+            connector.setMessageAuthorizationPolicy(policy);
+        }
+        
+        if (isUseJmx()) {
+            connector = connector.asManagedConnector(getManagementContext().getMBeanServer(),
getBrokerObjectName());
+            registerConnectorMBean(connector);
+        }        
+        connector.start();
     }
 
     public boolean isDeleteAllMessagesOnStartup() {



Mime
View raw message