activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1508928 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala
Date Wed, 31 Jul 2013 15:31:33 GMT
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);



Mime
View raw message