You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/03/04 00:07:44 UTC
svn commit: r749824 -
/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
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 )