activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r746390 - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ/trunk/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/ Apache.NMS.ActiveMQ/trunk/src/...
Date Fri, 20 Feb 2009 22:29:56 GMT
Author: jgomes
Date: Fri Feb 20 22:29:55 2009
New Revision: 746390

URL: http://svn.apache.org/viewvc?rev=746390&view=rev
Log:
Refactored the NAnt scripts to link in the correct framework assemblies for the given target framework.  Several code changes were necessary now that the .NET Compact Framework was actually being compiled.  Several code enhancements had been made that were incompatible with .NET CF 2.0.
Fixes [AMQNET-142]. (See https://issues.apache.org/activemq/browse/AMQNET-142)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/Multicast/MulticastDiscoveryAgent.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/MaxInactivityDurationTest.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/test/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITrace.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Fri Feb 20 22:29:55 2009
@@ -41,6 +41,7 @@
   <property name="current.build.framework" value="${framework::get-target-framework()}"  overwrite="false"/>
   <property name="current.build.defines"   value="${build.defines}" />
   <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+  <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true"/>
 
   <if test="${build.skip.release}">
     <property name="build.config.strings"  value="debug"/>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant.build Fri Feb 20 22:29:55 2009
@@ -68,16 +68,16 @@
     </if>
 
     <assemblyfileset failonempty="true" id="dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
       <include name="${Apache.NMS.dll}"/>
     </assemblyfileset>
 
     <assemblyfileset failonempty="true" id="test.dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
       <include name="${Apache.NMS.dll}"/>
       <include name="${Apache.NMS.Test.dll}"/>
       <include name="${build.bin.dir}/${project.name}.dll"/>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Connection.cs Fri Feb 20 22:29:55 2009
@@ -46,9 +46,9 @@
 		private bool connected = false;
 		private bool closed = false;
 		private bool closing = false;
-		private long sessionCounter = 0;
-		private long temporaryDestinationCounter = 0;
-		private long localTransactionCounter;
+		private int sessionCounter = 0;
+		private int temporaryDestinationCounter = 0;
+		private int localTransactionCounter;
 		private readonly AtomicBoolean started = new AtomicBoolean(false);
 		private bool disposed = false;
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageProducer.cs Fri Feb 20 22:29:55 2009
@@ -29,7 +29,7 @@
 		private Session session;
 		private bool closed = false;
 		private readonly ProducerInfo info;
-		private long messageCounter = 0;
+		private int messageCounter = 0;
 
 		private bool msgPersistent = NMSConstants.defaultPersistence;
 		private TimeSpan requestTimeout = NMSConstants.defaultRequestTimeout;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs Fri Feb 20 22:29:55 2009
@@ -32,13 +32,13 @@
 		/// Private object used for synchronization, instead of public "this"
 		/// </summary>
 		private readonly object myLock = new object();
-		private long consumerCounter;
+		private int consumerCounter;
 		private readonly IDictionary consumers = Hashtable.Synchronized(new Hashtable());
 		private readonly IDictionary producers = Hashtable.Synchronized(new Hashtable());
 		private readonly DispatchingThread dispatchingThread;
 		private DispatchingThread.ExceptionHandler dispatchingThread_ExceptionHandler;
 		private readonly SessionInfo info;
-		private long producerCounter;
+		private int producerCounter;
 		internal bool startedAsyncDelivery = false;
 		private bool disposed = false;
 		private bool closed = false;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/State/SynchronizedObjects.cs Fri Feb 20 22:29:55 2009
@@ -132,6 +132,7 @@
 			}
 		}
 
+#if !NETCF
 		public IEnumerator GetEnumerator(int index, int count)
 		{
 			lock(myLock)
@@ -139,7 +140,7 @@
 				return _collection.GetEnumerator(index, count);
 			}
 		}
-
+#endif
 	}
 
 	public class SynchronizedDictionary<TKey, TValue>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs Fri Feb 20 22:29:55 2009
@@ -29,10 +29,10 @@
  	/// </summary>
 	public class TaskRunnerFactory
 	{
-		private int maxIterationsPerRun;
-		private String name;
-		private ThreadPriority priority;
-		private bool daemon;
+		protected int maxIterationsPerRun;
+		protected String name;
+		protected ThreadPriority priority;
+		protected bool daemon;
 
 		public TaskRunnerFactory()
 		{
@@ -51,7 +51,6 @@
 
 		public void initTaskRunnerFactory(String name, ThreadPriority priority, bool daemon, int maxIterationsPerRun, bool dedicatedTaskRunner)
 		{
-
 			this.name = name;
 			this.priority = priority;
 			this.daemon = daemon;

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/src/main/csharp/Transport/Discovery/DiscoveryTransportFactory.cs?rev=746390&r1=746389&r2=746390&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 Fri Feb 20 22:29:55 2009
@@ -30,6 +30,7 @@
 		private static MulticastDiscoveryAgent agent;
 		private static string currentServiceName;
 		private static readonly object uriLock = new object();
+		private static readonly AutoResetEvent uriDiscoveredEvent = new AutoResetEvent(false);
 		public static event ExceptionListener OnException;
 
 		public DiscoveryTransportFactory()
@@ -48,7 +49,7 @@
 				}
 
 				// This will end the wait in the CreateTransport method.
-				Monitor.Pulse(uriLock);
+				uriDiscoveredEvent.Set();
 			}
 		}
 
@@ -105,7 +106,7 @@
 							"Unable to find a connection before the timeout period expired.");
 					}
 
-					Monitor.Wait(uriLock, TIMEOUT_IN_SECONDS * 1000);
+					uriDiscoveredEvent.WaitOne(TIMEOUT_IN_SECONDS * 1000, true);
 				}
 			}
 

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/Multicast/MulticastDiscoveryAgent.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/Multicast/MulticastDiscoveryAgent.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/Multicast/MulticastDiscoveryAgent.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Discovery/Multicast/MulticastDiscoveryAgent.cs Fri Feb 20 22:29:55 2009
@@ -17,7 +17,6 @@
 
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Net;
 using System.Net.Sockets;
 using System.Threading;
@@ -44,11 +43,12 @@
 		private const int SOCKET_TIMEOUT_MILLISECONDS = 500;
 
 		private string group;
+		private object stopstartSemaphore = new object();
 		private bool isStarted = false;
 		private readonly Uri discoveryUri;
 		private Socket multicastSocket;
 		private IPEndPoint endPoint;
-		private BackgroundWorker worker;
+		private Thread worker;
 
 		private event NewBrokerServiceFound onNewServiceFound;
 		private event BrokerServiceRemoved onServiceRemoved;
@@ -67,58 +67,65 @@
 
 		public void Start()
 		{
-			if(!isStarted)
+			lock(stopstartSemaphore)
 			{
-				isStarted = true;
-
-				if(multicastSocket == null)
+				if(!isStarted)
 				{
-					int numFailedAttempts = 0;
-					int backoffTime = DEFAULT_BACKOFF_MILLISECONDS;
+					Tracer.Info("Starting multicast discovery agent worker thread");
+					isStarted = true;
 
-					while(!TryToConnectSocket())
+					if(multicastSocket == null)
 					{
-						numFailedAttempts++;
+						int numFailedAttempts = 0;
+						int backoffTime = DEFAULT_BACKOFF_MILLISECONDS;
 
-						if(numFailedAttempts > MAX_SOCKET_CONNECTION_RETRY_ATTEMPS)
+						while(!TryToConnectSocket())
 						{
-							throw new ApplicationException(
-								"Could not open the socket in order to discover advertising brokers.");
-						}
+							numFailedAttempts++;
+							if(numFailedAttempts > MAX_SOCKET_CONNECTION_RETRY_ATTEMPS)
+							{
+								throw new ApplicationException(
+									"Could not open the socket in order to discover advertising brokers.");
+							}
 
-						Thread.Sleep(backoffTime);
-						backoffTime *= BACKOFF_MULTIPLIER;
+							Thread.Sleep(backoffTime);
+							backoffTime *= BACKOFF_MULTIPLIER;
+						}
 					}
-				}
-
-				if(worker == null)
-				{
-					worker = new BackgroundWorker();
-					worker.DoWork += worker_DoWork;
-				}
 
-				if(!worker.IsBusy)
-				{
-					worker.RunWorkerAsync();
+					if(worker == null)
+					{
+						worker = new Thread(new ThreadStart(worker_DoWork));
+						worker.Start();
+					}
 				}
-
 			}
 		}
 
 		public void Stop()
 		{
-			isStarted = false;
+			Tracer.Info("Stopping multicast discovery agent worker thread");
+			Thread localThread = null;
 
-			DateTime expireTime = DateTime.Now.AddSeconds(WORKER_KILL_TIME_SECONDS);
+			lock(stopstartSemaphore)
+			{
+				localThread = worker;
+				worker = null;
+				// Changing the isStarted flag will signal the thread that it needs to shut down.
+				isStarted = false;
+			}
 
-			//wait for the worker to stop. Give it up to WORKER_KILL_TIME_SECONDS
-			while(worker.IsBusy)
+			if(localThread != null)
 			{
-				if(expireTime < DateTime.Now)
+				// wait for the worker to stop.
+				if(!localThread.Join(WORKER_KILL_TIME_SECONDS))
 				{
-					throw new ApplicationException("Unable to stop the worker thread.");
+					Tracer.Info("!! Timeout waiting for multicast discovery agent localThread to stop");
+					localThread.Abort();
 				}
 			}
+
+			Tracer.Info("Multicast discovery agent worker thread joined");
 		}
 
 		private bool TryToConnectSocket()
@@ -138,7 +145,9 @@
 
 				multicastSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership,
 												 new MulticastOption(ip, IPAddress.Any));
+#if !NETCF
 				multicastSocket.ReceiveTimeout = SOCKET_TIMEOUT_MILLISECONDS;
+#endif
 				hasSucceeded = true;
 			}
 			catch(SocketException)
@@ -148,7 +157,7 @@
 			return hasSucceeded;
 		}
 
-		private void worker_DoWork(object sender, DoWorkEventArgs e)
+		private void worker_DoWork()
 		{
 			Thread.CurrentThread.Name = "Discovery Agent Thread.";
 			byte[] buffer = new byte[BUFF_SIZE];
@@ -159,8 +168,8 @@
 			{
 				try
 				{
-					multicastSocket.Receive(buffer);
-					receivedInfoRaw = System.Text.Encoding.UTF8.GetString(buffer);
+					int numBytes = multicastSocket.Receive(buffer);
+					receivedInfoRaw = System.Text.Encoding.UTF8.GetString(buffer, 0, numBytes);
 					// We have to remove all of the null bytes.
 					receivedInfo = receivedInfoRaw.Substring(0, receivedInfoRaw.IndexOf("\0"));
 					ProcessBrokerMessage(receivedInfo);

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs Fri Feb 20 22:29:55 2009
@@ -23,6 +23,11 @@
 using Apache.NMS.ActiveMQ.Threads;
 using Apache.NMS.Util;
 
+#if NETCF
+using ThreadInterruptedException = System.Exception;
+#endif
+
+
 namespace Apache.NMS.ActiveMQ.Transport.Failover
 {
 	/// <summary>
@@ -118,9 +123,8 @@
 					{
 						parent.reconnectTask.wakeup();
 					}
-					catch(ThreadInterruptedException e)
+					catch(ThreadInterruptedException)
 					{
-						e.GetType();
 						Tracer.Debug("Reconnect task has been interrupted.");
 					}
 				}
@@ -415,150 +419,139 @@
 			Exception error = null;
 			try
 			{
-				try
-				{
-					reconnectMutex.WaitOne();
+				reconnectMutex.WaitOne();
 
-					if(IsShutdownCommand(command) && ConnectedTransport == null)
+				if(IsShutdownCommand(command) && ConnectedTransport == null)
+				{
+					if(command.IsShutdownInfo)
 					{
-						if(command.IsShutdownInfo)
-						{
-							// Skipping send of ShutdownInfo command when not connected.
-							return;
-						}
+						// Skipping send of ShutdownInfo command when not connected.
+						return;
+					}
 
-						if(command is RemoveInfo)
-						{
-							// Simulate response to RemoveInfo command
-							Response response = new Response();
-							response.CorrelationId = command.CommandId;
-							onCommand(this, response);
-							return;
-						}
+					if(command is RemoveInfo)
+					{
+						// Simulate response to RemoveInfo command
+						Response response = new Response();
+						response.CorrelationId = command.CommandId;
+						onCommand(this, response);
+						return;
 					}
-					// Keep trying until the message is sent.
-					for(int i = 0; !disposed; i++)
+				}
+				// Keep trying until the message is sent.
+				for(int i = 0; !disposed; i++)
+				{
+					try
 					{
-						try
+						// Wait for transport to be connected.
+						ITransport transport = ConnectedTransport;
+						while(transport == null && !disposed
+							&& connectionFailure == null
+							// && !Thread.CurrentThread.isInterrupted()
+							)
 						{
-							// Wait for transport to be connected.
-							ITransport transport = ConnectedTransport;
-							while(transport == null && !disposed
-								&& connectionFailure == null
-								// && !Thread.CurrentThread.isInterrupted()
-								)
+							Tracer.Info("Waiting for transport to reconnect.");
+							try
 							{
-								Tracer.Info("Waiting for transport to reconnect.");
+								// Release so that the reconnect task can run
+								reconnectMutex.ReleaseMutex();
 								try
 								{
-									// Release so that the reconnect task can run
-									reconnectMutex.ReleaseMutex();
-									try
-									{
-										// Wait for something
-										Thread.Sleep(1000);
-									}
-									catch(ThreadInterruptedException e)
-									{
-										Thread.CurrentThread.Interrupt();		// KILROY - not needed
-										Tracer.Debug("Interupted: " + e);
-									}
+									// Wait for something
+									Thread.Sleep(1000);
 								}
-								finally
+								catch(ThreadInterruptedException e)
 								{
-									reconnectMutex.WaitOne();
+									Tracer.Debug("Interupted: " + e);
 								}
-
-								transport = ConnectedTransport;
 							}
-
-							if(transport == null)
+							finally
 							{
-								// Previous loop may have exited due to use being
-								// disposed.
-								if(disposed)
-								{
-									error = new IOException("Transport disposed.");
-								}
-								else if(connectionFailure != null)
-								{
-									error = connectionFailure;
-								}
-								else
-								{
-									error = new IOException("Unexpected failure.");
-								}
-								break;
+								reconnectMutex.WaitOne();
 							}
 
-							// If it was a request and it was not being tracked by
-							// the state tracker,
-							// then hold it in the requestMap so that we can replay
-							// it later.
-							Tracked tracked = stateTracker.track(command);
-							lock(requestMap)
+							transport = ConnectedTransport;
+						}
+
+						if(transport == null)
+						{
+							// Previous loop may have exited due to use being
+							// disposed.
+							if(disposed)
 							{
-								if(tracked != null && tracked.WaitingForResponse)
-								{
-									requestMap.Add(command.CommandId, tracked);
-								}
-								else if(tracked == null && command.ResponseRequired)
-								{
-									requestMap.Add(command.CommandId, command);
-								}
+								error = new IOException("Transport disposed.");
+							}
+							else if(connectionFailure != null)
+							{
+								error = connectionFailure;
+							}
+							else
+							{
+								error = new IOException("Unexpected failure.");
 							}
+							break;
+						}
 
-							// Send the message.
-							try
+						// If it was a request and it was not being tracked by
+						// the state tracker,
+						// then hold it in the requestMap so that we can replay
+						// it later.
+						Tracked tracked = stateTracker.track(command);
+						lock(requestMap)
+						{
+							if(tracked != null && tracked.WaitingForResponse)
 							{
-								transport.Oneway(command);
-								stateTracker.trackBack(command);
+								requestMap.Add(command.CommandId, tracked);
 							}
-							catch(Exception e)
+							else if(tracked == null && command.ResponseRequired)
 							{
+								requestMap.Add(command.CommandId, command);
+							}
+						}
 
-								// If the command was not tracked.. we will retry in
-								// this method
-								if(tracked == null)
-								{
+						// Send the message.
+						try
+						{
+							transport.Oneway(command);
+							stateTracker.trackBack(command);
+						}
+						catch(Exception e)
+						{
 
-									// since we will retry in this method.. take it
-									// out of the request
-									// map so that it is not sent 2 times on
-									// recovery
-									if(command.ResponseRequired)
-									{
-										requestMap.Remove(command.CommandId);
-									}
+							// If the command was not tracked.. we will retry in
+							// this method
+							if(tracked == null)
+							{
 
-									// Rethrow the exception so it will handled by
-									// the outer catch
-									throw e;
+								// since we will retry in this method.. take it
+								// out of the request
+								// map so that it is not sent 2 times on
+								// recovery
+								if(command.ResponseRequired)
+								{
+									requestMap.Remove(command.CommandId);
 								}
 
+								// Rethrow the exception so it will handled by
+								// the outer catch
+								throw e;
 							}
 
-							return;
-
-						}
-						catch(Exception e)
-						{
-							Tracer.Debug("Send Oneway attempt: " + i + " failed.");
-							handleTransportFailure(e);
 						}
+
+						return;
+
+					}
+					catch(Exception e)
+					{
+						Tracer.Debug("Send Oneway attempt: " + i + " failed.");
+						handleTransportFailure(e);
 					}
-				}
-				finally
-				{
-					reconnectMutex.ReleaseMutex();
 				}
 			}
-			catch(ThreadInterruptedException e)
+			finally
 			{
-				e.GetType();
-				// Some one may be trying to stop our thread.
-				Thread.CurrentThread.Interrupt();
-				throw new ThreadInterruptedException();
+				reconnectMutex.ReleaseMutex();
 			}
 
 			if(!disposed)
@@ -656,10 +649,8 @@
 					{
 						reconnectTask.wakeup();
 					}
-					catch(ThreadInterruptedException e)
+					catch(ThreadInterruptedException)
 					{
-						e.GetType();	// Suppress warning
-						Thread.CurrentThread.Interrupt();
 					}
 				}
 				else
@@ -892,10 +883,8 @@
 					{
 						Thread.Sleep(ReconnectDelay);
 					}
-					catch(ThreadInterruptedException e)
+					catch(ThreadInterruptedException)
 					{
-						e.GetType();
-						Thread.CurrentThread.Interrupt();
 					}
 				}
 				finally

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/MaxInactivityDurationTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/MaxInactivityDurationTest.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/MaxInactivityDurationTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/OpenWire/MaxInactivityDurationTest.cs Fri Feb 20 22:29:55 2009
@@ -53,7 +53,7 @@
 						Assert.AreEqual(CORRELATION_ID, receivedMsg.NMSCorrelationID, "Invalid correlation ID.");
 
 						// Go inactive...
-						Thread.Sleep(TimeSpan.FromSeconds(60));
+						Thread.Sleep(60 * 1000);
 
 						// Send another message.
 						SendMessage(producer);

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant-common.xml Fri Feb 20 22:29:55 2009
@@ -41,6 +41,7 @@
   <property name="current.build.framework" value="${framework::get-target-framework()}"  overwrite="false"/>
   <property name="current.build.defines"   value="${build.defines}" />
   <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+  <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true"/>
 
   <if test="${build.skip.release}">
     <property name="build.config.strings"  value="debug"/>

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/nant.build Fri Feb 20 22:29:55 2009
@@ -80,17 +80,17 @@
     </if>
 
   	<assemblyfileset failonempty="true" id="dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
       <include name="${TIBCO.EMS.dll}"/>
       <include name="${Apache.NMS.dll}"/>
   	</assemblyfileset>
 
   	<assemblyfileset failonempty="true" id="test.dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
       <include name="${TIBCO.EMS.dll}"/>
       <include name="${Apache.NMS.dll}"/>
       <include name="${Apache.NMS.Test.dll}"/>

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/test/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/test/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/test/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/test/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant-common.xml Fri Feb 20 22:29:55 2009
@@ -41,6 +41,7 @@
   <property name="current.build.framework" value="${framework::get-target-framework()}"  overwrite="false"/>
   <property name="current.build.defines"   value="${build.defines}" />
   <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+  <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true"/>
 
   <if test="${build.skip.release}">
     <property name="build.config.strings"  value="debug"/>

Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/nant.build Fri Feb 20 22:29:55 2009
@@ -69,18 +69,18 @@
     </if>
 
   	<assemblyfileset failonempty="true" id="dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
-      <include name="${lib.framework.dir}/System.Messaging.dll" />
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Messaging.dll" />
       <include name="${Apache.NMS.dll}"/>
   	</assemblyfileset>
 
   	<assemblyfileset failonempty="true" id="test.dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
-      <include name="${lib.framework.dir}/System.Messaging.dll" />
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Messaging.dll" />
       <include name="${Apache.NMS.dll}"/>
       <include name="${Apache.NMS.Test.dll}"/>
       <include name="${build.bin.dir}/${project.name}.dll"/>

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant-common.xml Fri Feb 20 22:29:55 2009
@@ -41,6 +41,7 @@
   <property name="current.build.framework" value="${framework::get-target-framework()}"  overwrite="false"/>
   <property name="current.build.defines"   value="${build.defines}" />
   <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+  <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true"/>
 
   <if test="${build.skip.release}">
     <property name="build.config.strings"  value="debug"/>

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build Fri Feb 20 22:29:55 2009
@@ -35,7 +35,7 @@
 	<property name="Apache.NMS.Test.dll" value="${basedir}/lib/Apache.NMS/${current.build.framework}//Apache.NMS.Test.dll" dynamic="true"/>
 	<property name="Apache.NMS.Test.pdb" value="${basedir}/lib/Apache.NMS/${current.build.framework}/Apache.NMS.Test.pdb" dynamic="true"/>
 
-	<!-- Skip certain frameworks, since ActiveMQ.NET Client is not supported on those platforms. -->
+	<!-- Skip certain frameworks, since WCF Client is not supported on those platforms. -->
 	<property name="build.net-1.1.skip" value="true"/>
 	<property name="build.net-2.0.skip" value="true"/>
 	<property name="build.mono-2.0.skip" value="true"/>
@@ -68,28 +68,25 @@
 			<property name="build.skip" value="true"/>
 		</if>
 
-		<property name="net-3.0-referencepath" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\v3.0\" />
-		<property name="net-3.0-installed" value="${directory::exists(net-3.0-referencepath)}" />
-
 		<assemblyfileset failonempty="true" id="dependencies">
-			<include name="mscorlib.dll" asis="true"/>
-			<include name="System.dll" asis="true"/>
-			<include name="System.configuration.dll" asis="true"/>
-			<include if="${net-3.0-installed}" name="${net-3.0-referencepath}\System.Runtime.Serialization.dll" />
-			<include if="${net-3.0-installed}" name="${net-3.0-referencepath}\System.ServiceModel.dll" />
-			<include name="System.Web.Services.dll" asis="true"/>
-			<include name="System.Xml.dll" asis="true"/>
+			<include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.configuration.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.Runtime.Serialization.dll" />
+			<include name="${current.build.framework.assembly.dir}/System.ServiceModel.dll" />
+			<include name="${current.build.framework.assembly.dir}/System.Web.Services.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
 			<include name="${Apache.NMS.dll}" asis="true"/>
 		</assemblyfileset>
 
 		<assemblyfileset failonempty="true" id="test.dependencies">
-			<include name="mscorlib.dll" asis="true"/>
-			<include name="System.dll" asis="true"/>
-			<include name="System.configuration.dll" asis="true"/>
-			<include if="${net-3.0-installed}" name="${net-3.0-referencepath}\System.Runtime.Serialization.dll" />
-			<include if="${net-3.0-installed}" name="${net-3.0-referencepath}\System.ServiceModel.dll" />
-			<include name="System.Web.Services.dll" asis="true"/>
-			<include name="System.Xml.dll" asis="true"/>
+			<include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.configuration.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.Runtime.Serialization.dll" />
+			<include name="${current.build.framework.assembly.dir}/System.ServiceModel.dll" />
+			<include name="${current.build.framework.assembly.dir}/System.Web.Services.dll"/>
+			<include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
 			<include name="${Apache.NMS.dll}"/>
 			<include name="${Apache.NMS.Test.dll}"/>
 			<include name="${build.bin.dir}/${project.name}.dll"/>

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant-common.xml Fri Feb 20 22:29:55 2009
@@ -41,6 +41,7 @@
   <property name="current.build.framework" value="${framework::get-target-framework()}"  overwrite="false"/>
   <property name="current.build.defines"   value="${build.defines}" />
   <property name="build.framework.strings" value="net-1.1,net-2.0,net-3.5,mono-2.0,netcf-2.0"/>
+  <property name="current.build.framework.assembly.dir" value="${framework::get-assembly-directory(framework::get-target-framework())}" dynamic="true"/>
 
   <if test="${build.skip.release}">
     <property name="build.config.strings"  value="debug"/>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/nant.build?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/nant.build Fri Feb 20 22:29:55 2009
@@ -48,16 +48,16 @@
   <target name="dependency-init" description="Initializes build dependencies">
 
     <assemblyfileset failonempty="true" id="dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Web.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Web.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
     </assemblyfileset>
 
     <assemblyfileset failonempty="true" id="test.dependencies">
-      <include name="mscorlib.dll" asis="true"/>
-      <include name="System.dll" asis="true"/>
-      <include name="System.Xml.dll" asis="true"/>
+      <include name="${current.build.framework.assembly.dir}/mscorlib.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.dll"/>
+      <include name="${current.build.framework.assembly.dir}/System.Xml.dll"/>
       <include name="${build.bin.dir}/${project.name}.dll"/>
       <include name="${nunit.dll}"/>
       <include name="${nunit.extensions.dll}"/>

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITrace.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITrace.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITrace.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITrace.cs Fri Feb 20 22:29:55 2009
@@ -1,18 +1,19 @@
-//
-// Copyright 2001-2006 The Apache Software Foundation
-//
-// Licensed 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.
-//
+/*
+ * 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.
+ */
 
 namespace Apache.NMS
 {
@@ -33,7 +34,7 @@
 		void Info(string message);
 		void Warn(string message);
   		void Error(string message);
-		void Fatal(object message);
+		void Fatal(string message);
 
 		bool IsDebugEnabled { get; }
 		bool IsInfoEnabled { get; }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Util/URISupport.cs Fri Feb 20 22:29:55 2009
@@ -20,7 +20,9 @@
 using System.Globalization;
 using System.Reflection;
 using System.Text;
+#if !NETCF
 using System.Web;
+#endif
 
 namespace Apache.NMS.Util
 {

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/AsyncConsumeTest.cs Fri Feb 20 22:29:55 2009
@@ -28,7 +28,7 @@
 		protected static string DESTINATION_NAME = "AsyncConsumeDestination";
 		protected static string TEST_CLIENT_ID = "AsyncConsumeClientId";
 		protected static string RESPONSE_CLIENT_ID = "AsyncConsumeResponseClientId";
-		protected object semaphore = new object();
+		protected AutoResetEvent semaphore;
 		protected bool received;
 		protected IMessage receivedMsg;
 
@@ -36,6 +36,7 @@
 		public override void SetUp()
 		{
 			base.SetUp();
+			semaphore = new AutoResetEvent(false);
 			received = false;
 			receivedMsg = null;
 		}
@@ -246,24 +247,14 @@
 
 		protected void OnMessage(IMessage message)
 		{
-			lock(semaphore)
-			{
-				receivedMsg = message;
-				received = true;
-				Monitor.PulseAll(semaphore);
-			}
+			receivedMsg = message;
+			received = true;
+			semaphore.Set();
 		}
 
 		protected void WaitForMessageToArrive()
 		{
-			lock(semaphore)
-			{
-				if(!received)
-				{
-					Monitor.Wait(semaphore, receiveTimeout);
-				}
-			}
-
+			semaphore.WaitOne((int) receiveTimeout.TotalMilliseconds, true);
 			Assert.IsTrue(received, "Should have received a message by now!");
 		}
 	}

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/CommonAssemblyInfo.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/CommonAssemblyInfo.cs Fri Feb 20 22:29:55 2009
@@ -5,7 +5,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/ConsumerTest.cs Fri Feb 20 22:29:55 2009
@@ -92,6 +92,8 @@
 			}
 		}
 
+// The .NET CF does not have the ability to interrupt threads, so this test is impossible.
+#if !NETCF
 		[Test]
 		public void TestNoTimeoutConsumer()
 		{
@@ -144,5 +146,6 @@
 				Assert.Fail("Test failed with exception: " + e.Message);
 			}
 		}
+#endif
 	}
 }

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs?rev=746390&r1=746389&r2=746390&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/test/csharp/NmsTracer.cs Fri Feb 20 22:29:55 2009
@@ -1,61 +1,87 @@
+/*
+ * 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 System.Diagnostics;
 
 namespace Apache.NMS.Test
 {
 	public class NmsTracer : Apache.NMS.ITrace
-    {
-        #region ITrace Members
-        public void Debug(string message)
-        {
-            Trace.WriteLine("DEBUG: " + message);
-        }
-
-        public void Error(string message)
-        {
-            Trace.WriteLine("ERROR: " + message);
-        }
-
-        public void Fatal(object message)
-        {
-            Trace.WriteLine("FATAL: " + message);
-        }
-
-        public void Info(string message)
-        {
-            Trace.WriteLine("INFO:  " + message);
-        }
-
-        public void Warn(string message)
-        {
-            Trace.WriteLine("WARN:  " + message);
-        }
-
-        public bool IsDebugEnabled
-        {
-            get { return true; }
-        }
-
-        public bool IsErrorEnabled
-        {
-            get { return true; }
-        }
-
-        public bool IsFatalEnabled
-        {
-            get { return true; }
-        }
-
-        public bool IsInfoEnabled
-        {
-            get { return true; }
-        }
-
-        public bool IsWarnEnabled
-        {
-            get { return true; }
-        }
+	{
+		#region ITrace Members
+		public void Debug(string message)
+		{
+#if !NETCF
+			System.Diagnostics.Trace.WriteLine(string.Format("DEBUG: {0}", message));
+#endif
+		}
+
+		public void Error(string message)
+		{
+#if !NETCF
+			System.Diagnostics.Trace.WriteLine(string.Format("ERROR: {0}", message));
+#endif
+		}
+
+		public void Fatal(string message)
+		{
+#if !NETCF
+			System.Diagnostics.Trace.WriteLine(string.Format("FATAL: {0}", message));
+#endif
+		}
+
+		public void Info(string message)
+		{
+#if !NETCF
+			System.Diagnostics.Trace.WriteLine(string.Format("INFO: {0}", message));
+#endif
+		}
+
+		public void Warn(string message)
+		{
+#if !NETCF
+			System.Diagnostics.Trace.WriteLine(string.Format("WARN: {0}", message));
+#endif
+		}
+
+		public bool IsDebugEnabled
+		{
+			get { return true; }
+		}
+
+		public bool IsErrorEnabled
+		{
+			get { return true; }
+		}
+
+		public bool IsFatalEnabled
+		{
+			get { return true; }
+		}
+
+		public bool IsInfoEnabled
+		{
+			get { return true; }
+		}
+
+		public bool IsWarnEnabled
+		{
+			get { return true; }
+		}
 
-        #endregion
-    }
+		#endregion
+	}
 }



Mime
View raw message