[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-commits
Subject:    svn commit: r809656 -
From:       jgomes () apache ! org
Date:       2009-08-31 16:40:25
Message-ID: 20090831164025.731592388867 () eris ! apache ! org
[Download RAW message or body]

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/s \
rc/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);
 		}
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic