activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r708307 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs
Date Mon, 27 Oct 2008 20:28:58 GMT
Author: jgomes
Date: Mon Oct 27 13:28:58 2008
New Revision: 708307

URL: http://svn.apache.org/viewvc?rev=708307&view=rev
Log:
Applied patch submitted by Allan Schrum.  Thanks, Allan!
Fixes [AMQNET-118]. (See https://issues.apache.org/activemq/browse/AMQNET-118)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs?rev=708307&r1=708306&r2=708307&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFactory.cs
Mon Oct 27 13:28:58 2008
@@ -46,7 +46,7 @@
 		{
 			ITransportFactory factory;
 
-			switch(scheme.ToLower())
+			switch(scheme)
 			{
 				case "tcp":
 					factory = new TcpTransportFactory();
@@ -105,10 +105,15 @@
 			}
 
 			scheme = scheme.ToLower();
-			ITransportFactory tf = TransportFactory.factoryCache[scheme];
-			if(null == tf)
+			ITransportFactory tf;
+			try
 			{
-				tf = TransportFactory.AddTransportFactory(scheme);
+			    tf = TransportFactory.factoryCache[scheme];
+			}
+			catch
+			{
+			    // missing in the cache - go add request it if it exists
+			    tf = TransportFactory.AddTransportFactory(scheme);
 			}
 
 			return tf;



Mime
View raw message