You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2011/01/13 17:03:15 UTC

svn commit: r1058634 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala

Author: chirino
Date: Thu Jan 13 16:03:15 2011
New Revision: 1058634

URL: http://svn.apache.org/viewvc?rev=1058634&view=rev
Log:
Better broker config validation.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.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=1058634&r1=1058633&r2=1058634&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 16:03:15 2011
@@ -139,6 +139,10 @@ object Broker extends Log {
       for (connector <- config.connectors ) {
         result |= Connector.validate(connector, reporter)
       }
+      if( config.web_admin != null ) {
+        WebServerFactory.validate(config.web_admin, reporter)
+      }
+
     }.result
   }
 }
@@ -186,10 +190,11 @@ class Broker() extends BaseService {
   /**
    * Validates and then applies the configuration.
    */
-  def configure(config: BrokerDTO, reporter:Reporter) = dispatch_queue {
+  def configure(config: BrokerDTO, reporter:Reporter) = {
     if ( validate(config, reporter) < ERROR ) {
-      this.config = config
-
+      dispatch_queue {
+        this.config = config
+      }
       if( service_state.is_started ) {
         // TODO: apply changes while he broker is running.
         reporter.report(WARN, "Updating broker configuration at runtime is not yet supported.  You must restart the broker for the change to take effect.")