activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r749824 - /activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
Date Tue, 03 Mar 2009 23:07:44 GMT
Author: tabish
Date: Tue Mar  3 23:07:43 2009
New Revision: 749824

URL: http://svn.apache.org/viewvc?rev=749824&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-100

Add code to the FailoverTransportFactory to make use of the Composite data class and parse
out the embedded URIs for the Failover Transport to connect to.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp?rev=749824&r1=749823&r2=749824&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
(original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
Tue Mar  3 23:07:43 2009
@@ -18,6 +18,8 @@
 #include "FailoverTransportFactory.h"
 
 #include <activemq/transport/failover/FailoverTransport.h>
+#include <activemq/util/CompositeData.h>
+#include <activemq/util/URISupport.h>
 
 #include <decaf/lang/Boolean.h>
 #include <decaf/lang/Integer.h>
@@ -25,6 +27,7 @@
 #include <memory>
 
 using namespace activemq;
+using namespace activemq::util;
 using namespace activemq::transport;
 using namespace activemq::transport::failover;
 using namespace activemq::exceptions;
@@ -41,6 +44,7 @@
 
     try {
 
+        CompositeData data = URISupport::parseComposite( location );
         Pointer<FailoverTransport> transport( new FailoverTransport() );
 
         transport->setInitialReconnectDelay(
@@ -64,6 +68,8 @@
         transport->setMaxCacheSize(
             Integer::parseInt( properties.getProperty( "maxCacheSize", "131072" ) ) );
 
+        transport->addURI( data.getComponents() );
+
         return transport;
     }
     AMQ_CATCH_RETHROW( ActiveMQException )



Mime
View raw message