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 2013/02/27 00:21:16 UTC

svn commit: r1450523 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: ./ src/main/csharp/ src/main/csharp/State/ src/main/csharp/Transport/ src/test/csharp/ src/test/csharp/Commands/

Author: jgomes
Date: Tue Feb 26 23:21:16 2013
New Revision: 1450523

URL: http://svn.apache.org/r1450523
Log:
Fix for AMQNET-415. Throw an InvalidClientIDException if the login credentials are incorrect when using a failover protocol connection.  Added matching unit test.
Unit Test cleanup: Standardized the destination naming convention to prefix names with "TEST.".

Added:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/InvalidCredentialsTest.cs
Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nmsprovider-test.config
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/AMQNET383Test.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/Commands/MessageTest.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompQueueTransactionTest.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompRedeliveryPolicyTest.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompTopicTransactionTest.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nmsprovider-test.config
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nmsprovider-test.config?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nmsprovider-test.config (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nmsprovider-test.config Tue Feb 26 23:21:16 2013
@@ -17,4 +17,19 @@
 -->
 <configuration>
     <defaultURI value="stomp:tcp://${activemqhost}:61613"/>
+  <InvalidCredentials-BogusUser value="stomp:failover:tcp://${activemqhost}:61613">
+    <factoryParams>
+      <param type="string" value="InvalidCredentialsTestClient"/>
+    </factoryParams>
+    <userName value="BogusUser"/>
+    <passWord value="BogusPassword"/>
+  </InvalidCredentials-BogusUser>
+
+  <InvalidCredentials-AuthenticUser value="stomp:failover:tcp://${activemqhost}:61613">
+    <factoryParams>
+      <param type="string" value="InvalidCredentialsTestClient"/>
+    </factoryParams>
+    <userName value="system"/>
+    <passWord value="manager"/>
+  </InvalidCredentials-AuthenticUser>
 </configuration>

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs Tue Feb 26 23:21:16 2013
@@ -18,6 +18,7 @@
 using System;
 using System.Collections;
 using System.Collections.Specialized;
+using System.Reflection;
 using System.Threading;
 using Apache.NMS.Stomp.Commands;
 using Apache.NMS.Stomp.Threads;
@@ -74,11 +75,7 @@ namespace Apache.NMS.Stomp
             this.brokerUri = connectionUri;
             this.clientIdGenerator = clientIdGenerator;
 
-            this.transport = transport;
-            this.transport.Command = new CommandHandler(OnCommand);
-            this.transport.Exception = new ExceptionHandler(OnTransportException);
-            this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
-            this.transport.Resumed = new ResumedHandler(OnTransportResumed);
+			SetTransport(transport);
 
             ConnectionId id = new ConnectionId();
             id.Value = CONNECTION_ID_GENERATOR.GenerateId();
@@ -310,7 +307,16 @@ namespace Apache.NMS.Stomp
 
         #endregion
 
-        /// <summary>
+		private void SetTransport(ITransport newTransport)
+		{
+			this.transport = newTransport;
+			this.transport.Command = new CommandHandler(OnCommand);
+			this.transport.Exception = new ExceptionHandler(OnTransportException);
+			this.transport.Interrupted = new InterruptedHandler(OnTransportInterrupted);
+			this.transport.Resumed = new ResumedHandler(OnTransportResumed);
+		}
+
+		/// <summary>
         /// Starts asynchronous message delivery of incoming messages for this connection.
         /// Synchronous delivery is unaffected.
         /// </summary>
@@ -448,7 +454,7 @@ namespace Apache.NMS.Stomp
                 }
                 catch(Exception ex)
                 {
-                    Tracer.ErrorFormat("Error during connection close: {0}", ex);
+                    Tracer.ErrorFormat("Error during connection close: {0}", ex.Message);
                 }
                 finally
                 {
@@ -583,13 +589,34 @@ namespace Apache.NMS.Stomp
                                 {
                                     if(null != transport)
                                     {
-                                        // Send the connection and see if an ack/nak is returned.
+										// Make sure the transport is started.
+										if(!this.transport.IsStarted)
+										{
+											this.transport.Start();
+										}
+										
+										// Send the connection and see if an ack/nak is returned.
                                         Response response = transport.Request(this.info, this.RequestTimeout);
                                         if(!(response is ExceptionResponse))
                                         {
                                             connected.Value = true;
                                         }
-                                    }
+										else
+										{
+											ExceptionResponse error = response as ExceptionResponse;
+											NMSException exception = CreateExceptionFromBrokerError(error.Exception);
+											if(exception is InvalidClientIDException)
+											{
+												// This is non-recoverable.
+												// Shutdown the transport connection, and re-create it, but don't start it.
+												// It will be started if the connection is re-attempted.
+												this.transport.Stop();
+												ITransport newTransport = TransportFactory.CreateTransport(this.brokerUri);
+												SetTransport(newTransport);
+												throw exception;
+											}
+										}
+									}
                                 }
                                 catch
                                 {
@@ -664,7 +691,7 @@ namespace Apache.NMS.Stomp
             }
             else
             {
-                Tracer.Error("Unknown command: " + command);
+                Tracer.ErrorFormat("Unknown command: {0}", command);
             }
         }
 
@@ -717,7 +744,7 @@ namespace Apache.NMS.Stomp
                 }
                 else
                 {
-                    Tracer.Debug("Async exception with no exception listener: " + error);
+                    Tracer.DebugFormat("Async exception with no exception listener: {0}", error.Message);
                 }
             }
         }
@@ -753,7 +780,7 @@ namespace Apache.NMS.Stomp
             }
             catch(Exception ex)
             {
-                Tracer.Debug("Caught Exception While disposing of Transport: " + ex);
+                Tracer.DebugFormat("Caught Exception While disposing of Transport: {0}", ex.Message);
             }
 
             IList sessionsCopy = null;
@@ -772,7 +799,7 @@ namespace Apache.NMS.Stomp
                 }
                 catch(Exception ex)
                 {
-                    Tracer.Debug("Caught Exception While disposing of Sessions: " + ex);
+                    Tracer.DebugFormat("Caught Exception While disposing of Sessions: {0}", ex.Message);
                 }
             }
         }
@@ -784,7 +811,7 @@ namespace Apache.NMS.Stomp
             this.transportInterruptionProcessingComplete = new CountDownLatch(dispatchers.Count);
             if(Tracer.IsDebugEnabled)
             {
-                Tracer.Debug("transport interrupted, dispatchers: " + dispatchers.Count);
+                Tracer.DebugFormat("transport interrupted, dispatchers: {0}", dispatchers.Count);
             }
 
             foreach(Session session in this.sessions)
@@ -880,8 +907,8 @@ namespace Apache.NMS.Stomp
             {
                 if(!closed.Value && cdl.Remaining > 0)
                 {
-                    Tracer.Warn("dispatch paused, waiting for outstanding dispatch interruption " +
-                                "processing (" + cdl.Remaining + ") to complete..");
+                    Tracer.WarnFormat("dispatch paused, waiting for outstanding dispatch interruption " +
+								"processing ({0}) to complete..", cdl.Remaining);
                     cdl.await(TimeSpan.FromSeconds(10));
                 }
             }
@@ -895,5 +922,73 @@ namespace Apache.NMS.Stomp
                 cdl.countDown();
             }
         }
-    }
+
+		private NMSException CreateExceptionFromBrokerError(BrokerError brokerError)
+		{
+			String exceptionClassName = brokerError.ExceptionClass;
+
+			if(String.IsNullOrEmpty(exceptionClassName))
+			{
+				return new BrokerException(brokerError);
+			}
+
+			NMSException exception = null;
+			String message = brokerError.Message;
+
+			// We only create instances of exceptions from the NMS API
+			Assembly nmsAssembly = Assembly.GetAssembly(typeof(NMSException));
+
+			// First try and see if it's one we populated ourselves in which case
+			// it will have the correct namespace and exception name.
+			Type exceptionType = nmsAssembly.GetType(exceptionClassName, false, true);
+
+			// Exceptions from the broker don't have the same namespace, so we
+			// trim that and try using the NMS namespace to see if we can get an
+			// NMSException based version of the same type.  We have to convert
+			// the JMS prefixed exceptions to NMS also.
+			if(null == exceptionType)
+			{
+				if(exceptionClassName.StartsWith("java.lang.SecurityException"))
+				{
+					exceptionClassName = "Apache.NMS.InvalidClientIDException";
+				}
+				else if(!exceptionClassName.StartsWith("Apache.NMS"))
+				{
+					string transformClassName;
+
+					if(exceptionClassName.Contains("."))
+					{
+						int pos = exceptionClassName.LastIndexOf(".");
+						transformClassName = exceptionClassName.Substring(pos + 1).Replace("JMS", "NMS");
+					}
+					else
+					{
+						transformClassName = exceptionClassName;
+					}
+
+					exceptionClassName = "Apache.NMS." + transformClassName;
+				}
+
+				exceptionType = nmsAssembly.GetType(exceptionClassName, false, true);
+			}
+
+			if(exceptionType != null)
+			{
+				object[] args = null;
+				if(!String.IsNullOrEmpty(message))
+				{
+					args = new object[1];
+					args[0] = message;
+				}
+
+				exception = Activator.CreateInstance(exceptionType, args) as NMSException;
+			}
+			else
+			{
+				exception = new BrokerException(brokerError);
+			}
+
+			return exception;
+		}
+	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs Tue Feb 26 23:21:16 2013
@@ -118,8 +118,6 @@ namespace Apache.NMS.Stomp
                     connection.DefaultClientId = this.clientId;
                 }
 
-                connection.ITransport.Start();
-
                 return connection;
             }
             catch(NMSException e)

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/ConnectionState.cs Tue Feb 26 23:21:16 2013
@@ -48,40 +48,52 @@ namespace Apache.NMS.Stomp.State
 		{
 			get
 			{
-				ConsumerState consumerState;
-				
-				if(consumers.TryGetValue(id, out consumerState))
-				{
-					return consumerState;
-				}
+				ConsumerState consumerState = null;
+
+				consumers.TryGetValue(id, out consumerState);
 				
 #if DEBUG
-				// Useful for dignosing missing consumer ids
-				string consumerList = string.Empty;
-				foreach(ConsumerId consumerId in consumers.Keys)
+				if(null == consumerState)
 				{
-					consumerList += consumerId.ToString() + "\n";
+					// Useful for dignosing missing consumer ids
+					string consumerList = string.Empty;
+					foreach(ConsumerId consumerId in consumers.Keys)
+					{
+						consumerList += consumerId.ToString() + "\n";
+					}
+
+					System.Diagnostics.Debug.Assert(false,
+						string.Format("Consumer '{0}' did not exist in the consumers collection.\n\nConsumers:-\n{1}", id, consumerList));
 				}
-				
-				System.Diagnostics.Debug.Assert(false,
-					string.Format("Consumer '{0}' did not exist in the consumers collection.\n\nConsumers:-\n{1}", id, consumerList));
 #endif
-				return null;
+				return consumerState;
 			}
 		}
 
 		public void addConsumer(ConsumerInfo info)
 		{
 			checkShutdown();
-			consumers.Add(info.ConsumerId, new ConsumerState(info));
+
+			ConsumerState consumerState = new ConsumerState(info);
+
+			if(consumers.ContainsKey(info.ConsumerId))
+			{
+				consumers[info.ConsumerId] = consumerState;
+			}
+			else
+			{
+				consumers.Add(info.ConsumerId, consumerState);
+			}
 		}
 
 		public ConsumerState removeConsumer(ConsumerId id)
 		{
 			ConsumerState ret = null;
-			
-			consumers.TryGetValue(id, out ret);
-			consumers.Remove(id);
+
+			if(consumers.TryGetValue(id, out ret))
+			{
+				consumers.Remove(id);
+			}
 			return ret;
 		}
 

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/State/SynchronizedObjects.cs Tue Feb 26 23:21:16 2013
@@ -222,5 +222,21 @@ namespace Apache.NMS.Stomp.State
 				return _dictionary.Remove(v);
 			}
 		}
+
+		public bool ContainsKey(TKey k)
+		{
+			lock(((ICollection) _dictionary).SyncRoot)
+			{
+				return _dictionary.ContainsKey(k);
+			}
+		}
+
+		public bool ContainsValue(TValue v)
+		{
+			lock(((ICollection) _dictionary).SyncRoot)
+			{
+				return _dictionary.ContainsValue(v);
+			}
+		}
 	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Transport/InactivityMonitor.cs Tue Feb 26 23:21:16 2013
@@ -90,7 +90,7 @@ namespace Apache.NMS.Stomp.Transport
         {
             this.instanceId = ++id;
             this.localWireFormatInfo = wireFormat;
-            Tracer.Debug("Creating Inactivity Monitor: " + instanceId);
+            Tracer.DebugFormat("Creating Inactivity Monitor: {0}", instanceId);
         }
 
         ~InactivityMonitor()
@@ -280,7 +280,7 @@ namespace Apache.NMS.Stomp.Transport
         {
             if(failed.CompareAndSet(false, true) && !this.disposing)
             {
-                Tracer.Debug("Exception received in the Inactivity Monitor: " + command.ToString());
+                Tracer.DebugFormat("Exception received in the Inactivity Monitor: {0}", command.Message);
                 StopMonitorThreads();
                 base.OnException(sender, command);
             }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/AMQNET383Test.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/AMQNET383Test.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/AMQNET383Test.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/AMQNET383Test.cs Tue Feb 26 23:21:16 2013
@@ -33,7 +33,7 @@ namespace Apache.NMS.Stomp.Test
     public class NMSTestStability : NMSTestSupport
     {
         // TODO set proper configuration parameters
-        private const string destination = "test";
+        private const string destination = "TEST.Stability";
 
         private static int numberOfMessages = 0;
         private static IConnection producerConnection = null;

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/Commands/MessageTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/Commands/MessageTest.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/Commands/MessageTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/Commands/MessageTest.cs Tue Feb 26 23:21:16 2013
@@ -44,8 +44,8 @@ namespace Apache.NMS.Stomp.Test.Commands
         {
             this.nmsMessageID = "testid";
             this.nmsCorrelationID = "testcorrelationid";
-            this.nmsDestination = new Topic("test.topic");
-            this.nmsReplyTo = new TempTopic("test.replyto.topic:001");
+            this.nmsDestination = new Topic("TEST.Message");
+			this.nmsReplyTo = new TempTopic("TEST.Message.replyto.topic:001");
             this.nmsDeliveryMode = MsgDeliveryMode.NonPersistent;
             this.nmsRedelivered = true;
             this.nmsType = "test type";

Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/InvalidCredentialsTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/InvalidCredentialsTest.cs?rev=1450523&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/InvalidCredentialsTest.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/InvalidCredentialsTest.cs Tue Feb 26 23:21:16 2013
@@ -0,0 +1,61 @@
+/*
+ * 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.Test;
+using NUnit.Framework;
+
+namespace Apache.NMS.Stomp.Test
+{
+	[TestFixture]
+	public class InvalidCredentialsTest : NMSTestSupport
+	{
+		[SetUp]
+		public override void SetUp()
+		{
+			base.SetUp();
+		}
+
+		[TearDown]
+		public override void TearDown()
+		{
+			base.TearDown();
+		}
+
+		// Maximum time to run is 20 seconds.
+		[Test] //, Timeout(20000)]
+		public void TestRestartInvalidCredentialsWithFailover()
+		{
+			// To run this test successfully, the broker must have secure login enabled.
+			// This test will attempt to login to the server using invalid credentials.
+			// It should not connect, and should not go into failover retry loop.
+			// It will then attempt to login with correct credentials, and it should be succcessful on second attempt.
+			Assert.IsTrue(CreateNMSFactory("InvalidCredentials-BogusUser"));
+			using(IConnection connection = CreateConnection())
+			{
+				Assert.Throws(typeof(InvalidClientIDException), () => { connection.Start(); }, "You may not have enabled credential login on the broker.  Credentials must be enabled for this test to pass.");
+			}
+
+			// Now connect with a valid user account.
+			Assert.IsTrue(CreateNMSFactory("InvalidCredentials-AuthenticUser"));
+			using(IConnection connection = CreateConnection())
+			{
+				Assert.DoesNotThrow(() => { connection.Start(); }, "You may not have set the InvalidCredentials-AuthenticUser node in the nmsprovider-test.config file.");
+			}
+		}
+	}
+}

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs Tue Feb 26 23:21:16 2013
@@ -57,42 +57,42 @@ namespace Apache.NMS.Stomp.Test
         [Test]
         public void TestQueueSynchRecover()
         {
-            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+            destination = new Queue("TEST.Queue-" + DateTime.Now.Ticks);
             DoTestSynchRecover();
         }
 
         [Test]
         public void TestQueueAsynchRecover()
         {
-            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+			destination = new Queue("TEST.Queue-" + DateTime.Now.Ticks);
             DoTestAsynchRecover();
         }
 
         [Test]
         public void TestTopicSynchRecover()
         {
-            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+			destination = new Topic("TEST.Topic-" + DateTime.Now.Ticks);
             DoTestSynchRecover();
         }
 
         [Test]
         public void TestTopicAsynchRecover()
         {
-            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+			destination = new Topic("TEST.Topic-" + DateTime.Now.Ticks);
             DoTestAsynchRecover();
         }
 
         [Test]
         public void TestQueueAsynchRecoverWithAutoAck()
         {
-            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+			destination = new Queue("TEST.Queue-" + DateTime.Now.Ticks);
             DoTestAsynchRecoverWithAutoAck();
         }
 
         [Test]
         public void TestTopicAsynchRecoverWithAutoAck()
         {
-            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+			destination = new Topic("TEST.Topic-" + DateTime.Now.Ticks);
             DoTestAsynchRecoverWithAutoAck();
         }
 

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompQueueTransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompQueueTransactionTest.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompQueueTransactionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompQueueTransactionTest.cs Tue Feb 26 23:21:16 2013
@@ -28,7 +28,7 @@ namespace Apache.NMS.Stomp.Test
     public class StompQueueTransactionTest : StompTransactionTestSupport
     {
         public const String CLIENT_ID = "QueueTransactionTest";
-        public const String DESTINATION_NAME = "QueueTransactionTestDestination";
+		public const String DESTINATION_NAME = "TEST.QueueTransactionTest";
 
         protected override bool Topic
         {

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompRedeliveryPolicyTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompRedeliveryPolicyTest.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompRedeliveryPolicyTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompRedeliveryPolicyTest.cs Tue Feb 26 23:21:16 2013
@@ -29,7 +29,7 @@ namespace Apache.NMS.Stomp.Test
     [TestFixture]
     public class StompRedeliveryPolicyTest : NMSTestSupport
     {
-        private const string DESTINATION_NAME = "RedeliveryPolicyTestDest";
+		private const string DESTINATION_NAME = "TEST.RedeliveryPolicyTestDest";
 
         [Test]
         public void TestExponentialRedeliveryPolicyDelaysDeliveryOnRollback()

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompTopicTransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompTopicTransactionTest.cs?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompTopicTransactionTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/StompTopicTransactionTest.cs Tue Feb 26 23:21:16 2013
@@ -28,7 +28,7 @@ namespace Apache.NMS.Stomp.Test
     public class StompTopicTransactionTest : StompTransactionTestSupport
     {
         public const String CLIENT_ID = "TopicTransactionTest";
-        public const String DESTINATION_NAME = "StompTopicTransactionTestDestination";
+		public const String DESTINATION_NAME = "TEST.StompTopicTransactionTestDestination";
         public const String SUBSCRIPTION_NAME = "TopicTransactionTest";
 
         protected override bool Topic

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj Tue Feb 26 23:21:16 2013
@@ -55,17 +55,20 @@
     <NoWarn>3016</NoWarn>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Xml" />
-    <Reference Include="nunit.framework">
-      <HintPath>lib\NUnit\mono-2.0\nunit.framework.dll</HintPath>
+    <Reference Include="Apache.NMS, Version=1.6.0.2963, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.dll</HintPath>
     </Reference>
-    <Reference Include="Apache.NMS.Test">
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.Test.dll</HintPath>
+    <Reference Include="Apache.NMS.Test, Version=1.6.0.2963, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.Test.dll</HintPath>
     </Reference>
-    <Reference Include="Apache.NMS">
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.dll</HintPath>
+    <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\NUnit\net-2.0\nunit.framework.dll</HintPath>
     </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
@@ -100,6 +103,7 @@
   </ProjectExtensions>
   <ItemGroup>
     <Compile Include="src\test\csharp\AMQNET383Test.cs" />
+    <Compile Include="src\test\csharp\InvalidCredentialsTest.cs" />
     <Compile Include="src\test\csharp\StompHelperTest.cs" />
     <Compile Include="src\test\csharp\StompRedeliveryPolicyTest.cs" />
     <Compile Include="src\test\csharp\Threads\CompositeTaskRunnerTest.cs" />

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj?rev=1450523&r1=1450522&r2=1450523&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj Tue Feb 26 23:21:16 2013
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.21022</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{AA51947C-1370-44DC-8692-1C8EFC5945F7}</ProjectGuid>
     <OutputType>Library</OutputType>
@@ -53,11 +53,12 @@
     <DefineConstants>TRACE;NET,NET_2_0</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Apache.NMS, Version=1.6.0.2963, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Xml" />
-    <Reference Include="Apache.NMS">
-      <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.dll</HintPath>
-    </Reference>
   </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">