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 2013/07/31 17:31:33 UTC

svn commit: r1508928 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala

Author: chirino
Date: Wed Jul 31 15:31:33 2013
New Revision: 1508928

URL: http://svn.apache.org/r1508928
Log:
If an invalid protocol name is configured on a connector generate a more descriptive error message indicating the error.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala?rev=1508928&r1=1508927&r2=1508928&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala Wed Jul 31 15:31:33 2013
@@ -242,7 +242,8 @@ class AcceptingConnector(val broker:Brok
 
     accepted.set(0)
     connected.set(0)
-    protocol = ProtocolFactory.get(config.protocol.getOrElse("any")).get
+    var protocol_name = config.protocol.getOrElse("any")
+    protocol = ProtocolFactory.get(protocol_name).getOrElse(throw new Exception("protocol named '"+protocol_name+"' does not exist"))
     transport_server = TransportFactory.bind( config.bind )
     transport_server.setDispatchQueue(dispatch_queue)
     transport_server.setBlockingExecutor(Broker.BLOCKABLE_THREAD_POOL);