activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r784719 - /activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
Date Mon, 15 Jun 2009 10:34:37 GMT
Author: dejanb
Date: Mon Jun 15 10:34:37 2009
New Revision: 784719

URL: http://svn.apache.org/viewvc?rev=784719&view=rev
Log:
fixing adding and removing transport servers

Modified:
    activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java

Modified: activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java?rev=784719&r1=784718&r2=784719&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
(original)
+++ activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/Broker.java
Mon Jun 15 10:34:37 2009
@@ -220,10 +220,12 @@
     		switch(state.get()) {
     		case RUNNING:
     			startTransportServerWrapException(server);
+    			break;
     		case CONFIGURATION:
         		this.transportServers.add(server);
+        		break;
     		default:
-    			throw new IllegalStateException("Cannot add a transport server when broker is: ");
+    			throw new IllegalStateException("Cannot add a transport server when broker is: " +
state.get());
     		}
     	}
 	}
@@ -233,11 +235,13 @@
     		switch(state.get()) {
     		case RUNNING:
     			stopTransportServerWrapException(server);
+    			break;
     		case STOPPED:
     		case CONFIGURATION:
         		this.transportServers.remove(server);
+        		break;
     		default:
-    			throw new IllegalStateException("Cannot add a transport server when broker is: ");
+    			throw new IllegalStateException("Cannot add a transport server when broker is: " +
state.get());
     		}
     	}
 	}



Mime
View raw message