activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1058671 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/ apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/ apollo-web/src/main/scala/org/apache/activemq/apollo/web/
Date Thu, 13 Jan 2011 17:18:07 GMT
Author: chirino
Date: Thu Jan 13 17:18:06 2011
New Revision: 1058671

URL: http://svn.apache.org/viewvc?rev=1058671&view=rev
Log:
Have the broker self register in the broker registry.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ApolloListener.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala?rev=1058671&r1=1058670&r2=1058671&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
Thu Jan 13 17:18:06 2011
@@ -243,6 +243,8 @@ class Broker() extends BaseService {
       }
     }
 
+    BrokerRegistry.add(this)
+
     // Start up the virtual hosts
     val first_tracker = new LoggingTracker("broker startup", dispatch_queue)
     val second_tracker = new LoggingTracker("broker startup", dispatch_queue)
@@ -284,6 +286,8 @@ class Broker() extends BaseService {
     if( web_server!=null ) {
       tracker.stop(web_server)
     }
+
+    BrokerRegistry.remove(this)
     tracker.callback(on_completed)
   }
 

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala?rev=1058671&r1=1058670&r2=1058671&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
Thu Jan 13 17:18:06 2011
@@ -114,8 +114,7 @@ class Run extends Action with Logging {
 
       debug("Starting broker");
       val broker = new Broker()
-      broker.config = config
-      BrokerRegistry.add(broker)
+      broker.configure(config, LoggingReporter(log))
       broker.start(^{
         info("Broker started");
       })

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ApolloListener.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ApolloListener.scala?rev=1058671&r1=1058670&r2=1058671&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ApolloListener.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ApolloListener.scala
Thu Jan 13 17:18:06 2011
@@ -45,8 +45,7 @@ class ApolloListener extends ServletCont
         // Only start the broker up if it's enabled..
         info("starting broker");
         broker = new Broker()
-        broker.config = config
-        BrokerRegistry.add(broker)
+        broker.configure(config, LoggingReporter(ApolloListener))
         broker.start()
       }
     } catch {
@@ -58,7 +57,6 @@ class ApolloListener extends ServletCont
   def contextDestroyed(sce: ServletContextEvent) = {
     if( configStore!=null ) {
       if( broker!=null ) {
-        BrokerRegistry.remove(broker);
         ServiceControl.stop(broker, "broker")
       }
       configStore.stop



Mime
View raw message