activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r592450 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk: ./ src/main/csharp/ src/test/csharp/
Date Tue, 06 Nov 2007 15:08:28 GMT
Author: chirino
Date: Tue Nov  6 07:08:27 2007
New Revision: 592450

URL: http://svn.apache.org/viewvc?rev=592450&view=rev
Log:
Updated this NMS implementation so that the discovery mechanisim in NMSConnectionFactory
can locate the implemenation.

Added:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.activemq
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.stomp
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.tcp
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSConnectionFactoryTest.cs
Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq-test.csproj
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq.csproj

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.activemq
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.activemq?rev=592450&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.activemq (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.activemq Tue
Nov  6 07:08:27 2007
@@ -0,0 +1 @@
+Apache.NMS.ActiveMQ.ConnectionFactory
\ No newline at end of file

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.stomp
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.stomp?rev=592450&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.stomp (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.stomp Tue Nov
 6 07:08:27 2007
@@ -0,0 +1 @@
+Apache.NMS.ActiveMQ.ConnectionFactory
\ No newline at end of file

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.tcp
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.tcp?rev=592450&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.tcp (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/Apache.NMS.NMSFactory.tcp Tue Nov 
6 07:08:27 2007
@@ -0,0 +1 @@
+Apache.NMS.ActiveMQ.ConnectionFactory
\ No newline at end of file

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs?rev=592450&r1=592449&r2=592450&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/ConnectionFactory.cs
Tue Nov  6 07:08:27 2007
@@ -85,7 +85,15 @@
 			ConnectionInfo info = CreateConnectionInfo(userName, password);
 
 			ITransportFactory tcpTransportFactory = new TcpTransportFactory();
-			ITransport transport = tcpTransportFactory.CreateTransport(brokerUri);
+
+            Uri uri = brokerUri;
+            // Do we need to strip off the activemq prefix??
+            if ("activemq".Equals(brokerUri.Scheme))
+            {
+                uri = new Uri(brokerUri.AbsolutePath);
+            }
+
+			ITransport transport = tcpTransportFactory.CreateTransport(uri);
 
 			IConnection connection = new Connection(transport, info);
 			connection.ClientId = info.ClientId;

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSConnectionFactoryTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSConnectionFactoryTest.cs?rev=592450&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSConnectionFactoryTest.cs
(added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSConnectionFactoryTest.cs
Tue Nov  6 07:08:27 2007
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+using System;
+using Apache.NMS;
+using NUnit.Framework;
+using System.Reflection;
+using System.IO;
+
+namespace Apache.NMS.ActiveMQ
+{
+    [TestFixture]
+    public class NMSConnectionFactoryTest 
+    {
+        [Test]
+        public void TestTcpURI()
+        {
+            NMSConnectionFactory factory = new NMSConnectionFactory("tcp://localhost:61616");
+            Assert.IsNotNull(factory);
+            Assert.IsNotNull(factory.ConnectionFactory);
+            Assert.IsTrue(factory.ConnectionFactory is Apache.NMS.ActiveMQ.ConnectionFactory);
+        }
+        [Test]
+        public void TestStompURI()
+        {
+            NMSConnectionFactory factory = new NMSConnectionFactory("stomp://localhost:61616");
+            Assert.IsNotNull(factory);
+            Assert.IsNotNull(factory.ConnectionFactory);
+            Assert.IsTrue(factory.ConnectionFactory is Apache.NMS.ActiveMQ.ConnectionFactory);
+        }
+
+        [Test]
+        public void TestActiveMQURI()
+        {
+            NMSConnectionFactory factory = new NMSConnectionFactory("activemq:tcp://localhost:61616");
+            Assert.IsNotNull(factory);
+            Assert.IsNotNull(factory.ConnectionFactory);
+            Assert.IsTrue(factory.ConnectionFactory is Apache.NMS.ActiveMQ.ConnectionFactory);
+        }
+
+    }
+
+
+}
+

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq-test.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq-test.csproj?rev=592450&r1=592449&r2=592450&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq-test.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq-test.csproj Tue Nov
 6 07:08:27 2007
@@ -46,6 +46,7 @@
     <Compile Include="src\test\csharp\ConsumerTest.cs" />
     <Compile Include="src\test\csharp\DurableTest.cs" />
     <Compile Include="src\test\csharp\MapMessageTest.cs" />
+    <Compile Include="src\test\csharp\NMSConnectionFactoryTest.cs" />
     <Compile Include="src\test\csharp\NMSPropertyTest.cs" />
     <Compile Include="src\test\csharp\OpenWire\BooleanStreamTest.cs">
       <SubType>Code</SubType>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq.csproj?rev=592450&r1=592449&r2=592450&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/vs2005-activemq.csproj Tue Nov  6 07:08:27
2007
@@ -255,6 +255,7 @@
     </Compile>
     <Compile Include="src\main\csharp\ConsumerClosedException.cs">
       <SubType>Code</SubType>
+      <CustomToolNamespace>T</CustomToolNamespace>
     </Compile>
     <Compile Include="src\main\csharp\DestinationFilter.cs">
       <SubType>Code</SubType>
@@ -709,6 +710,15 @@
       <Project>{300C1716-0674-4D01-8F5D-151E59A504FE}</Project>
       <Name>vs2005-nms</Name>
     </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="LICENSE.txt" />
+    <EmbeddedResource Include="NOTICE.txt" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Apache.NMS.NMSFactory.activemq" />
+    <EmbeddedResource Include="Apache.NMS.NMSFactory.tcp" />
+    <EmbeddedResource Include="Apache.NMS.NMSFactory.stomp" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
 </Project>



Mime
View raw message