activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r356616 - in /incubator/activemq/trunk: activemq-core/src/main/java/org/activemq/broker/jmx/ activemq-core/src/main/java/org/activemq/transport/vm/ activemq-ra/src/main/rar/ assembly/src/release/conf/ etc/
Date Tue, 13 Dec 2005 21:02:09 GMT
Author: chirino
Date: Tue Dec 13 13:02:04 2005
New Revision: 356616

URL: http://svn.apache.org/viewcvs?rev=356616&view=rev
Log:
- Updated the config xml to use new discovery syntax.
- Using specific version of activeio as that may change a bit soon.
- The vm transport now support specifing a broker config file: vm://localhost?brokerConfig=xbean:/path/to/config/file
- Starting the JMX connector was taking a LONG time to start up... so I switch to starting
it up async.
- The object name for a managed transport connection could be invalid so we now encode the
name so that it's not.


Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagementContext.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/transport/vm/VMTransportFactory.java
    incubator/activemq/trunk/activemq-ra/src/main/rar/broker-config.xml
    incubator/activemq/trunk/assembly/src/release/conf/activemq.xml
    incubator/activemq/trunk/etc/project.properties

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagedTransportConnection.java
Tue Dec 13 13:02:04 2005
@@ -25,6 +25,7 @@
 import org.activemq.thread.TaskRunnerFactory;
 import org.activemq.transport.Transport;
 import org.activemq.util.IOExceptionSupport;
+import org.activemq.util.JMXSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -116,7 +117,7 @@
         Hashtable map = new Hashtable(connectorName.getKeyPropertyList());
         map.put("Type", "Connection");
         String jmxConnectionId = ObjectName.quote(connectionId);
-        map.put("Connection", jmxConnectionId);
+        map.put("Connection", JMXSupport.encodeObjectNamePart(connectionId));
         try {
             return new ObjectName(connectorName.getDomain(), map);
         }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagementContext.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagementContext.java?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagementContext.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/broker/jmx/ManagementContext.java
Tue Dec 13 13:02:04 2005
@@ -82,12 +82,18 @@
                 getMBeanServer().invoke(namingServiceObjectName, "start", null, null);
             } catch (Throwable ignore) {
             }
-            try {
-                connectorServer.start();     
-                log.info("JMX consoles can connect to " + connectorServer.getAddress());
-            } catch (IOException e) {
-                log.warn("Failed to start jmx connector: "+e.getMessage());
-            }
+            Thread t = new Thread("JMX connector") {
+                public void run() {
+                    try {
+                        connectorServer.start();     
+                        log.info("JMX consoles can connect to " + connectorServer.getAddress());
+                    } catch (IOException e) {
+                        log.warn("Failed to start jmx connector: "+e.getMessage());
+                    }
+                }
+            };
+            t.setDaemon(true);
+            t.start();
         }
     }
 

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/transport/vm/VMTransportFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/transport/vm/VMTransportFactory.java?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/transport/vm/VMTransportFactory.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/activemq/transport/vm/VMTransportFactory.java
Tue Dec 13 13:02:04 2005
@@ -76,8 +76,13 @@
             try {
                 host =  location.getHost();
                 options = URISupport.parseParamters(location);
-                Map brokerOptions = IntrospectionSupport.extractProperties(options, "broker.");
-                brokerURI = new URI("broker://()/"+host+"?"+URISupport.createQueryString(brokerOptions));
+                String config = (String) options.remove("brokerConfig");
+                if( config != null ) {
+                    brokerURI = new URI(config);
+                } else {
+                    Map brokerOptions = IntrospectionSupport.extractProperties(options, "broker.");
+                    brokerURI = new URI("broker://()/"+host+"?"+URISupport.createQueryString(brokerOptions));
+                }
             } catch (URISyntaxException e1) {
                 throw IOExceptionSupport.create(e1);
             }

Modified: incubator/activemq/trunk/activemq-ra/src/main/rar/broker-config.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-ra/src/main/rar/broker-config.xml?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-ra/src/main/rar/broker-config.xml (original)
+++ incubator/activemq/trunk/activemq-ra/src/main/rar/broker-config.xml Tue Dec 13 13:02:04
2005
@@ -32,12 +32,12 @@
 
     <transportConnectors>
       <!-- prefixing a connector with discovery: causes the connector to be advertiesed
over rendezvous -->
-      <transportConnector uri="discovery:tcp://localhost:61616"/>
+      <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
     </transportConnectors>
 
     <networkConnectors>
       <!-- by default just auto discover the other brokers -->
-      <networkConnector uri="multicast"/>
+      <networkConnector uri="multicast://default"/>
       <!--
       <networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
       -->
@@ -46,4 +46,4 @@
   </broker>
 
 
-</beans>
\ No newline at end of file
+</beans>

Modified: incubator/activemq/trunk/assembly/src/release/conf/activemq.xml
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/assembly/src/release/conf/activemq.xml?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/assembly/src/release/conf/activemq.xml (original)
+++ incubator/activemq/trunk/assembly/src/release/conf/activemq.xml Tue Dec 13 13:02:04 2005
@@ -29,19 +29,13 @@
     </persistenceAdapter>
   
     <transportConnectors>
-      <!-- prefixing a connector with discovery: causes the connector to be advertiesed
over rendezvous -->
-      <!-- 
-      <transportConnector uri="discovery:tcp://localhost:61616"/>
-       -->
-      <transportConnector uri="tcp://localhost:61616"/>
+       <transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
     </transportConnectors>
     
     <networkConnectors>
       <!-- by default just auto discover the other brokers -->
-      <networkConnector uri="rendezvous://default"/>
-      
+      <networkConnector uri="multicast://default"/>
       <!--  
-      <networkConnector uri="multicast"/>
       <networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
       -->
     </networkConnectors>

Modified: incubator/activemq/trunk/etc/project.properties
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/etc/project.properties?rev=356616&r1=356615&r2=356616&view=diff
==============================================================================
--- incubator/activemq/trunk/etc/project.properties (original)
+++ incubator/activemq/trunk/etc/project.properties Tue Dec 13 13:02:04 2005
@@ -75,7 +75,7 @@
 commons_beanutils_version=1.6.1
 javacc_version=2.1
 activecluster_version=1.1-SNAPSHOT
-activeio_version=2.2-SNAPSHOT
+activeio_version=2.1
 drools_core_version=2.0-beta-13
 xerces_version=2.6.2
 xml_parser_apis_version=2.2.1



Mime
View raw message