You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jg...@apache.org on 2009/08/31 18:40:25 UTC
svn commit: r809656 -
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs
Author: jgomes
Date: Mon Aug 31 16:40:25 2009
New Revision: 809656
URL: http://svn.apache.org/viewvc?rev=809656&view=rev
Log:
Applied patch from Iddo Shoham to support composite URIs. Thanks, Iddo!
Fixes [AMQNET-184]. (See https://issues.apache.org/activemq/browse/AMQNET-184)
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs?rev=809656&r1=809655&r2=809656&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs Mon Aug 31 16:40:25 2009
@@ -17,6 +17,7 @@
using System;
using System.Threading;
+using Apache.NMS.Util;
using Apache.NMS.ActiveMQ.Transport.Discovery.Multicast;
using Apache.NMS.ActiveMQ.Transport.Tcp;
@@ -86,7 +87,14 @@
public ITransport CreateTransport(Uri location)
{
- if(!agent.IsStarted)
+ URISupport.CompositeData cd = URISupport.parseComposite(location);
+
+ if(cd.Components.Length > 0)
+ {
+ agent.DiscoveryURI = cd.Components[0];
+ }
+
+ if(!agent.IsStarted)
{
agent.Start();
}
@@ -110,7 +118,7 @@
public ITransport CompositeConnect(Uri location)
{
- throw new NMSConnectionException("Composite connection not supported with MulticastDiscovery transport.");
+ return CreateTransport(location);
}