activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r512332 - in /activemq/activemq-dotnet/trunk/src: main/csharp/ActiveMQ/ main/csharp/MSMQ/ test/csharp/ActiveMQ/
Date Tue, 27 Feb 2007 17:32:02 GMT
Author: jstrachan
Date: Tue Feb 27 09:32:00 2007
New Revision: 512332

URL: http://svn.apache.org/viewvc?view=rev&rev=512332
Log:
Allow an environment variable to be used to default the broker URL

Modified:
    activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/ConnectionFactory.cs
    activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/NMSPropertyTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs
    activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs

Modified: activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/ConnectionFactory.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/ConnectionFactory.cs (original)
+++ activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/ConnectionFactory.cs Tue Feb 27
09:32:00 2007
@@ -28,13 +28,20 @@
     /// </summary>
     public class ConnectionFactory : IConnectionFactory
     {
-        private Uri brokerUri = new Uri("tcp://localhost:61616");
+        private Uri brokerUri;
         private string userName;
         private string password;
         private string clientId;
         
+		public static string GetDefaultBrokerUrl()
+		{
+			// TODO look in system properties / environment variables
+			return "tcp://localhost:61616";
+		}
+		
         public ConnectionFactory()
         {
+			this.brokerUri = new Uri(GetDefaultBrokerUrl());
         }
         
         public ConnectionFactory(Uri brokerUri)

Modified: activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/CommonAssemblyInfo.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/trunk/src/main/csharp/MSMQ/CommonAssemblyInfo.cs Tue Feb 27 09:32:00
2007
@@ -1,16 +1,17 @@
-using System;
+using System;
 using System.Reflection;
 using System.Runtime.InteropServices;
+using System.Messaging;
 
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:2.0.50727.42
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 2.0.50727.42
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------
 
 [assembly: ComVisibleAttribute(false)]
 [assembly: CLSCompliantAttribute(true)]

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs Tue Feb 27 09:32:00
2007
@@ -24,10 +24,9 @@
 	[TestFixture]
     public class BadConsumeTest : NMS.Test.BadConsumeTest
     {
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
     }
 }

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs Tue Feb 27
09:32:00 2007
@@ -24,10 +24,9 @@
     [TestFixture]
     public class BytesMessageTest : NMS.Test.BytesMessageTest
     {
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
     }
 }

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs Tue Feb 27 09:32:00
2007
@@ -24,12 +24,10 @@
 	[TestFixture]
     public class ConsumerTest : NMS.Test.ConsumerTest
     {
-        private String brokerURI = "tcp://localhost:61616";
-
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
-        }	    				
+            return new ConnectionFactory();
+        }
     }
 }
 

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs Tue Feb 27 09:32:00
2007
@@ -23,11 +23,9 @@
     [TestFixture]
     public class DurableTest : NMS.Test.DurableTest
     {
-        private String brokerURI = "tcp://localhost:61616";
-
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
     }
-}
\ No newline at end of file
+}

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs Tue Feb 27 09:32:00
2007
@@ -22,13 +22,11 @@
 namespace ActiveMQ
 {
 	[ TestFixture ]
-    public class MapMessageTest : NMS.Test.MapMessageTest 
+    public class MapMessageTest : NMS.Test.MapMessageTest
     {
-
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
 	    
     }

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/NMSPropertyTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/NMSPropertyTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/NMSPropertyTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/NMSPropertyTest.cs Tue Feb 27
09:32:00 2007
@@ -25,10 +25,9 @@
     [ TestFixture ]
     public class NMSPropertyTest : NMS.Test.NMSPropertyTest
     {
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
     }
 }

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs Tue Feb
27 09:32:00 2007
@@ -24,10 +24,9 @@
     [ TestFixture ]
     public class TemporaryQueueTest : NMS.Test.TemporaryQueueTest
     {
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
     }
 }

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs Tue Feb 27 09:32:00
2007
@@ -24,11 +24,10 @@
 	[ TestFixture ]
     public class TextMessage : NMS.Test.TextMessage
     {
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
-        }        
+            return new ConnectionFactory();
+        }
     }
 }
 

Modified: activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs?view=diff&rev=512332&r1=512331&r2=512332
==============================================================================
--- activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs (original)
+++ activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs Tue Feb 27
09:32:00 2007
@@ -23,13 +23,11 @@
 namespace ActiveMQ
 {
 	[TestFixture]
-    public class TransactionTest : NMS.Test.TransactionTest 
+    public class TransactionTest : NMS.Test.TransactionTest
     {
-
-        private String brokerURI = "tcp://localhost:61616";
         protected override IConnectionFactory CreateConnectionFactory()
         {
-            return new ConnectionFactory(new Uri(brokerURI));
+            return new ConnectionFactory();
         }
 		
     }



Mime
View raw message