activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1201047 [1/2] - in /activemq/activemq-dotnet: Apache.NMS.ActiveMQ/trunk/ Apache.NMS.ActiveMQ/trunk/src/main/csharp/ Apache.NMS.ActiveMQ/trunk/src/test/csharp/ Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/ Apache.NMS.EMS/tru...
Date Fri, 11 Nov 2011 20:59:00 GMT
Author: tabish
Date: Fri Nov 11 20:58:59 2011
New Revision: 1201047

URL: http://svn.apache.org/viewvc?rev=1201047&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQNET-346

Adds Recover Method to NMS.  ActiveMQ and Stomp provider implementations added with tests.

Added:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs   (with props)
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs   (with props)
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs   (with props)
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs   (with props)
Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp-test.csproj
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj
    activemq/activemq-dotnet/Apache.NMS.ZMQ/trunk/src/main/csharp/Session.cs
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.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=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/nant-common.xml Fri Nov 11 20:58:59 2011
@@ -471,6 +471,7 @@
                 <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
                     <arg value="${NUnit.Projectfile}" />
                     <arg value="-labels" />
+                    <arg value="-exclude=Manual" />
                     <arg value="-xml=Nunit.TestOutput.xml" />
                 </exec>
             </if>

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs Fri Nov 11 20:58:59 2011
@@ -825,7 +825,6 @@ namespace Apache.NMS.ActiveMQ
 
 				if(this.session.IsTransacted)
 				{
-				    //this.session.TransactionContext.DtcWaitHandle.WaitOne();
 					this.AckLater(dispatch, AckType.DeliveredAck);
 				}
 			}
@@ -1027,7 +1026,7 @@ namespace Apache.NMS.ActiveMQ
 			}
 		}
 
-		private void Commit()
+		internal void Commit()
 		{
 			lock(this.dispatchedMessages)
 			{
@@ -1037,7 +1036,7 @@ namespace Apache.NMS.ActiveMQ
 			this.redeliveryDelay = 0;
 		}
 
-		private void Rollback()
+		internal void Rollback()
 		{
 			lock(this.unconsumedMessages.SyncRoot)
 			{

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=1201047&r1=1201046&r2=1201047&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 Nov 11 20:58:59 2011
@@ -653,6 +653,24 @@ namespace Apache.NMS.ActiveMQ
             this.DoRollback();
         }
 
+        public void Recover()
+        {
+            CheckClosed();
+
+            if (IsTransacted)
+            {
+                throw new IllegalStateException("Cannot Recover a Transacted Session");
+            }
+
+            lock(this.consumers.SyncRoot)
+            {
+                foreach(MessageConsumer consumer in this.consumers.Values)
+                {
+                    consumer.Rollback();
+                }
+            }
+        }
+
         #endregion
 
         internal void DoSend(ActiveMQDestination destination, ActiveMQMessage message,
@@ -930,6 +948,14 @@ namespace Apache.NMS.ActiveMQ
             }
         }
 
+        private void CheckClosed()
+        {
+            if (closed)
+            {
+                throw new IllegalStateException("Session is Closed");
+            }
+        }
+
         /// <summary>
         /// Prevents message from throwing an exception if a client calls Acknoweldge on
         /// a message that is part of a transaction either being produced or consumed.  The

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs?rev=1201047&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs Fri Nov 11 20:58:59 2011
@@ -0,0 +1,269 @@
+/*
+ * 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.ActiveMQ;
+using Apache.NMS.ActiveMQ.Commands;
+using Apache.NMS.Test;
+using Apache.NMS.Util;
+using NUnit.Framework;
+
+namespace Apache.NMS.ActiveMQ.Test
+{
+    [TestFixture]
+    public class NMSSessionRecoverTest : NMSTestSupport
+    {
+        private IConnection connection;
+        private IDestination destination;
+        private CountDownLatch doneCountDownLatch;
+        private ISession session;
+        private int counter;
+        private String errorMessage;
+
+        [SetUp]
+        public override void SetUp()
+        {
+            base.SetUp();
+
+            counter = 0;
+            errorMessage = null;
+            doneCountDownLatch = new CountDownLatch(1);
+            connection = CreateConnection();
+        }
+
+        [TearDown]
+        public override void TearDown()
+        {
+            base.TearDown();
+
+            if (connection != null)
+            {
+                connection.Close();
+            }
+        }
+
+        [Test]
+        public void TestQueueSynchRecover()
+        {
+            destination = new ActiveMQQueue("Queue-" + DateTime.Now.Ticks);
+            DoTestSynchRecover();
+        }
+
+        [Test]
+        public void TestQueueAsynchRecover()
+        {
+            destination = new ActiveMQQueue("Queue-" + DateTime.Now.Ticks);
+            DoTestAsynchRecover();
+        }
+
+        [Test]
+        public void TestTopicSynchRecover()
+        {
+            destination = new ActiveMQTopic("Topic-" + DateTime.Now.Ticks);
+            DoTestSynchRecover();
+        }
+
+        [Test]
+        public void TestTopicAsynchRecover()
+        {
+            destination = new ActiveMQTopic("Topic-" + DateTime.Now.Ticks);
+            DoTestAsynchRecover();
+        }
+
+        [Test]
+        public void TestQueueAsynchRecoverWithAutoAck()
+        {
+            destination = new ActiveMQQueue("Queue-" + DateTime.Now.Ticks);
+            DoTestAsynchRecoverWithAutoAck();
+        }
+
+        [Test]
+        public void TestTopicAsynchRecoverWithAutoAck()
+        {
+            destination = new ActiveMQTopic("Topic-" + DateTime.Now.Ticks);
+            DoTestAsynchRecoverWithAutoAck();
+        }
+
+        public void DoTestSynchRecover()
+        {
+            session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+            connection.Start();
+    
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            ITextMessage message = consumer.Receive(TimeSpan.FromMilliseconds(2000)) as ITextMessage;
+            Assert.AreEqual("First", message.Text);
+            Assert.IsFalse(message.NMSRedelivered);
+            message.Acknowledge();
+    
+            message = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(2000));
+            Assert.AreEqual("Second", message.Text);
+            Assert.IsFalse(message.NMSRedelivered);
+    
+            session.Recover();
+    
+            message = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(3000));
+            Assert.AreEqual("Second", message.Text);
+            Assert.IsTrue(message.NMSRedelivered);
+    
+            message.Acknowledge();
+        }
+
+        private void OnTestAsynchRecoverMessage(IMessage msg)
+        {
+            counter++;
+            try
+            {
+                ITextMessage message = msg as ITextMessage;
+                switch (counter)
+                {
+                case 1:
+                    Tracer.Debug("Got first Message: " + message.Text);
+                    Assert.AreEqual("First", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    message.Acknowledge();
+                    break;
+                case 2:
+                    Tracer.Debug("Got Second Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    session.Recover();
+                    break;
+                case 3:
+                    Tracer.Debug("Got Third Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsTrue(message.NMSRedelivered);
+                    message.Acknowledge();
+                    doneCountDownLatch.countDown();
+                    break;
+                default:
+                    errorMessage = "Got too many messages: " + counter;
+                    Tracer.Debug(errorMessage);
+                    doneCountDownLatch.countDown();
+                    break;
+                }
+            }
+            catch (Exception e)
+            {
+                errorMessage = "Got exception: " + e.Message;
+                Tracer.Warn("Exception on Message Receive: " + e.Message);
+                doneCountDownLatch.countDown();
+            }
+        }
+
+        public void DoTestAsynchRecover()
+        {
+            session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
+
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+    
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            consumer.Listener += OnTestAsynchRecoverMessage;
+            connection.Start();
+
+            if (doneCountDownLatch.await(TimeSpan.FromSeconds(10)))
+            {
+                if (!String.IsNullOrEmpty(errorMessage))
+                {
+                    Assert.Fail(errorMessage);
+                }
+            }
+            else
+            {
+                Assert.Fail("Timeout waiting for async message delivery to complete.");
+            }
+        }
+
+        private void OnTestAsynchRecoverWithAutoAck(IMessage msg)
+        {
+            counter++;
+            try
+            {
+                ITextMessage message = msg as ITextMessage;
+                switch (counter)
+                {
+                case 1:
+                    Tracer.Debug("Got first Message: " + message.Text);
+                    Assert.AreEqual("First", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    break;
+                case 2:
+                    // This should rollback the delivery of this message..
+                    // and re-deliver.
+                    Tracer.Debug("Got Second Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    session.Recover();
+                    break;
+                case 3:
+                    Tracer.Debug("Got Third Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsTrue(message.NMSRedelivered);
+                    doneCountDownLatch.countDown();
+                    break;
+                default:
+                    errorMessage = "Got too many messages: " + counter;
+                    Tracer.Debug(errorMessage);
+                    doneCountDownLatch.countDown();
+                    break;
+                }
+            }
+            catch (Exception e)
+            {
+                errorMessage = "Got exception: " + e.Message;
+                Tracer.Warn("Exception on Message Receive: " + e.Message);
+                doneCountDownLatch.countDown();
+            }
+        }
+
+        public void DoTestAsynchRecoverWithAutoAck()
+        {
+            session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            consumer.Listener += OnTestAsynchRecoverWithAutoAck;
+            connection.Start();
+
+            if (doneCountDownLatch.await(TimeSpan.FromSeconds(10)))
+            {
+                Tracer.Info("Finished waiting for async message delivery to complete.");
+                if (!String.IsNullOrEmpty(errorMessage))
+                {
+                    Assert.Fail(errorMessage);
+                }
+            }
+            else
+            {
+                Tracer.Warn("Timeout waiting for async message delivery to complete.");
+                Assert.Fail("Timeout waiting for async message delivery to complete.");
+            }
+        }
+    }
+}
+

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/NMSSessionRecoverTest.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs?rev=1201047&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs Fri Nov 11 20:58:59 2011
@@ -0,0 +1,82 @@
+/*
+ * 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 Apache.NMS.Util;
+using Apache.NMS.Test;
+using Apache.NMS.ActiveMQ;
+using Apache.NMS.ActiveMQ.Commands;
+using Apache.NMS.ActiveMQ.Transport;
+using Apache.NMS.ActiveMQ.Transport.Failover;
+using Apache.NMS.ActiveMQ.Transport.Tcp;
+using NUnit.Framework;
+
+namespace Apache.NMS.ActiveMQ.Test
+{
+    [TestFixture]
+    public class FailoverTransactionTest
+    {
+        private Connection connection;
+        private bool interrupted = false;
+        private bool resumed = false;
+
+//        [Test]
+//        public void FailoverBeforeCommitSentTest()
+//        {
+//            string uri = "failover:(tcp://${activemqhost}:61616)";
+//            IConnectionFactory factory = new ConnectionFactory(NMSTestSupport.ReplaceEnvVar(uri));
+//            using(connection = factory.CreateConnection() as Connection)
+//            {
+//                connection.ConnectionInterruptedListener +=
+//                    new ConnectionInterruptedListener(TransportInterrupted);
+//                connection.ConnectionResumedListener +=
+//                    new ConnectionResumedListener(TransportResumed);
+//
+//                connection.Start();
+//                using(ISession session = connection.CreateSession())
+//                {
+//                    IDestination destination = session.GetQueue("Test?consumer.prefetchSize=1");
+//                    PurgeQueue(connection, destination);
+//                    PutMsgIntoQueue(session, destination);
+//
+//                    using(IMessageConsumer consumer = session.CreateConsumer(destination))
+//                    {
+//                        consumer.Listener += OnMessage;
+//                        BreakConnection();
+//                        WaitForMessagesToArrive();
+//                    }
+//                }
+//            }
+//
+//            Assert.IsTrue(this.interrupted);
+//            Assert.IsTrue(this.resumed);
+//        }
+//
+//        public void TransportInterrupted()
+//        {
+//            this.interrupted = true;
+//        }
+//
+//        public void TransportResumed()
+//        {
+//            this.resumed = true;
+//        }
+
+    }
+}
+

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/test/csharp/Transport/failover/FailoverTransactionTest.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Session.cs Fri Nov 11 20:58:59 2011
@@ -18,472 +18,477 @@ using System;
 
 namespace Apache.NMS.EMS
 {
-	/// <summary>
-	/// Represents a NMS session to TIBCO.
-	/// </summary>
-	public class Session : Apache.NMS.ISession
-	{
-		public readonly TIBCO.EMS.Session tibcoSession;
-		private bool closed = false;
-		private bool disposed = false;
-
-		public Session(TIBCO.EMS.Session session)
-		{
-			this.tibcoSession = session;
-		}
-
-		~Session()
-		{
-			Dispose(false);
-		}
-
-		#region ISession Members
-
-		public Apache.NMS.IMessageProducer CreateProducer()
-		{
-			return CreateProducer(null);
-		}
-
-		public Apache.NMS.IMessageProducer CreateProducer(Apache.NMS.IDestination destination)
-		{
-			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
-
-			try
-			{
-				Apache.NMS.IMessageProducer producer = EMSConvert.ToNMSMessageProducer(this, this.tibcoSession.CreateProducer(destinationObj.tibcoDestination));
-				ConfigureProducer(producer);
-				return producer;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination)
-		{
-			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
-
-			try
-			{
-				Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination));
-				ConfigureConsumer(consumer);
-				return consumer;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector)
-		{
-			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
-
-			try
-			{
-				Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector));
-				ConfigureConsumer(consumer);
-				return consumer;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector, bool noLocal)
-		{
-			Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
-
-			try
-			{
-				Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector, noLocal));
-				ConfigureConsumer(consumer);
-				return consumer;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination, string name, string selector, bool noLocal)
-		{
-			Apache.NMS.EMS.Topic topicObj = (Apache.NMS.EMS.Topic) destination;
-
-			try
-			{
-				Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic, name, selector, noLocal));
-				ConfigureConsumer(consumer);
-				return consumer;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		private void ConfigureProducer(Apache.NMS.IMessageProducer producer)
-		{
-			producer.ProducerTransformer = this.ProducerTransformer;
-		}
-
-		private void ConfigureConsumer(Apache.NMS.IMessageConsumer consumer)
-		{
-			consumer.ConsumerTransformer = this.ConsumerTransformer;
-		}
-
-		public void DeleteDurableConsumer(string name)
-		{
-			try
-			{
-				this.tibcoSession.Unsubscribe(name);
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-			}
-		}
-
-		public IQueueBrowser CreateBrowser(IQueue queue)
-		{
-			Apache.NMS.EMS.Queue queueObj = (Apache.NMS.EMS.Queue) queue;
-
-			try
-			{
-				return EMSConvert.ToNMSQueueBrowser(this.tibcoSession.CreateBrowser(queueObj.tibcoQueue));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public IQueueBrowser CreateBrowser(IQueue queue, string selector)
-		{
-			Apache.NMS.EMS.Queue queueObj = (Apache.NMS.EMS.Queue) queue;
-
-			try
-			{
-				return EMSConvert.ToNMSQueueBrowser(this.tibcoSession.CreateBrowser(queueObj.tibcoQueue, selector));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IQueue GetQueue(string name)
-		{
-			try
-			{
-				return EMSConvert.ToNMSQueue(this.tibcoSession.CreateQueue(name));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.ITopic GetTopic(string name)
-		{
-			try
-			{
-				return EMSConvert.ToNMSTopic(this.tibcoSession.CreateTopic(name));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.ITemporaryQueue CreateTemporaryQueue()
-		{
-			try
-			{
-				return EMSConvert.ToNMSTemporaryQueue(this.tibcoSession.CreateTemporaryQueue());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.ITemporaryTopic CreateTemporaryTopic()
-		{
-			try
-			{
-				return EMSConvert.ToNMSTemporaryTopic(this.tibcoSession.CreateTemporaryTopic());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		/// <summary>
-		/// Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
-		/// </summary>
-		public void DeleteDestination(IDestination destination)
-		{
-			// TODO: Implement if possible.
-		}
-
-		public Apache.NMS.IMessage CreateMessage()
-		{
-			try
-			{
-				return EMSConvert.ToNMSMessage(this.tibcoSession.CreateMessage());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.ITextMessage CreateTextMessage()
-		{
-			try
-			{
-				return EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.ITextMessage CreateTextMessage(string text)
-		{
-			try
-			{
-				return EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage(text));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IMapMessage CreateMapMessage()
-		{
-			try
-			{
-				return EMSConvert.ToNMSMapMessage(this.tibcoSession.CreateMapMessage());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IBytesMessage CreateBytesMessage()
-		{
-			try
-			{
-				return EMSConvert.ToNMSBytesMessage(this.tibcoSession.CreateBytesMessage());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IBytesMessage CreateBytesMessage(byte[] body)
-		{
-			try
-			{
-				Apache.NMS.IBytesMessage bytesMessage = CreateBytesMessage();
-
-				if(null != bytesMessage)
-				{
-					bytesMessage.Content = body;
-				}
-
-				return bytesMessage;
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IStreamMessage CreateStreamMessage()
-		{
-			try
-			{
-				return EMSConvert.ToNMSStreamMessage(this.tibcoSession.CreateStreamMessage());
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public Apache.NMS.IObjectMessage CreateObjectMessage(Object body)
-		{
-			try
-			{
-				return EMSConvert.ToNMSObjectMessage(this.tibcoSession.CreateObjectMessage(body));
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-				return null;
-			}
-		}
-
-		public void Commit()
-		{
-			try
-			{
-				this.tibcoSession.Commit();
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-			}
-		}
-
-		public void Rollback()
-		{
-			try
-			{
-				this.tibcoSession.Rollback();
-			}
-			catch(Exception ex)
-			{
-				ExceptionUtil.WrapAndThrowNMSException(ex);
-			}
-		}
-
-		private ConsumerTransformerDelegate consumerTransformer;
-		/// <summary>
-		/// A Delegate that is called each time a Message is dispatched to allow the client to do
-		/// any necessary transformations on the received message before it is delivered.
-		/// The Session instance sets the delegate on each Consumer it creates.
-		/// </summary>
-		public ConsumerTransformerDelegate ConsumerTransformer
-		{
-			get { return this.consumerTransformer; }
-			set { this.consumerTransformer = value; }
-		}
-
-		private ProducerTransformerDelegate producerTransformer;
-		/// <summary>
-		/// A delegate that is called each time a Message is sent from this Producer which allows
-		/// the application to perform any needed transformations on the Message before it is sent.
-		/// The Session instance sets the delegate on each Producer it creates.
-		/// </summary>
-		public ProducerTransformerDelegate ProducerTransformer
-		{
-			get { return this.producerTransformer; }
-			set { this.producerTransformer = value; }
-		}
-
-		// Properties
-
-		/// <summary>
-		/// The default timeout for network requests.
-		/// </summary>
-		private TimeSpan requestTimeout = Apache.NMS.NMSConstants.defaultRequestTimeout;
-		public TimeSpan RequestTimeout
-		{
-			get { return this.requestTimeout; }
-			set { this.requestTimeout = value; }
-		}
-
-		public bool Transacted
-		{
-			get { return this.tibcoSession.Transacted; }
-		}
-
-		public Apache.NMS.AcknowledgementMode AcknowledgementMode
-		{
-			get { return EMSConvert.ToAcknowledgementMode(this.tibcoSession.SessionAcknowledgeMode); }
-		}
-
-		public void Close()
-		{
-			lock(this)
-			{
-				if(closed)
-				{
-					return;
-				}
-
-				try
-				{
-					this.tibcoSession.Close();
-				}
-				catch(Exception ex)
-				{
-					ExceptionUtil.WrapAndThrowNMSException(ex);
-				}
-				finally
-				{
-					closed = true;
-				}
-			}
-		}
-
-		#endregion
-
-		#region IDisposable Members
-
-		///<summary>
-		/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
-		///</summary>
-		///<filterpriority>2</filterpriority>
-		public void Dispose()
-		{
-			Dispose(true);
-			GC.SuppressFinalize(this);
-		}
-
-		protected void Dispose(bool disposing)
-		{
-			if(disposed)
-			{
-				return;
-			}
-
-			if(disposing)
-			{
-				// Dispose managed code here.
-			}
-
-			try
-			{
-				Close();
-			}
-			catch
-			{
-				// Ignore errors.
-			}
+    /// <summary>
+    /// Represents a NMS session to TIBCO.
+    /// </summary>
+    public class Session : Apache.NMS.ISession
+    {
+        public readonly TIBCO.EMS.Session tibcoSession;
+        private bool closed = false;
+        private bool disposed = false;
+
+        public Session(TIBCO.EMS.Session session)
+        {
+            this.tibcoSession = session;
+        }
+
+        ~Session()
+        {
+            Dispose(false);
+        }
+
+        #region ISession Members
+
+        public Apache.NMS.IMessageProducer CreateProducer()
+        {
+            return CreateProducer(null);
+        }
+
+        public Apache.NMS.IMessageProducer CreateProducer(Apache.NMS.IDestination destination)
+        {
+            Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
+
+            try
+            {
+                Apache.NMS.IMessageProducer producer = EMSConvert.ToNMSMessageProducer(this, this.tibcoSession.CreateProducer(destinationObj.tibcoDestination));
+                ConfigureProducer(producer);
+                return producer;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination)
+        {
+            Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
+
+            try
+            {
+                Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination));
+                ConfigureConsumer(consumer);
+                return consumer;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector)
+        {
+            Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
+
+            try
+            {
+                Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector));
+                ConfigureConsumer(consumer);
+                return consumer;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IMessageConsumer CreateConsumer(Apache.NMS.IDestination destination, string selector, bool noLocal)
+        {
+            Apache.NMS.EMS.Destination destinationObj = (Apache.NMS.EMS.Destination) destination;
+
+            try
+            {
+                Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateConsumer(destinationObj.tibcoDestination, selector, noLocal));
+                ConfigureConsumer(consumer);
+                return consumer;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IMessageConsumer CreateDurableConsumer(Apache.NMS.ITopic destination, string name, string selector, bool noLocal)
+        {
+            Apache.NMS.EMS.Topic topicObj = (Apache.NMS.EMS.Topic) destination;
+
+            try
+            {
+                Apache.NMS.IMessageConsumer consumer = EMSConvert.ToNMSMessageConsumer(this, this.tibcoSession.CreateDurableSubscriber(topicObj.tibcoTopic, name, selector, noLocal));
+                ConfigureConsumer(consumer);
+                return consumer;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        private void ConfigureProducer(Apache.NMS.IMessageProducer producer)
+        {
+            producer.ProducerTransformer = this.ProducerTransformer;
+        }
+
+        private void ConfigureConsumer(Apache.NMS.IMessageConsumer consumer)
+        {
+            consumer.ConsumerTransformer = this.ConsumerTransformer;
+        }
+
+        public void DeleteDurableConsumer(string name)
+        {
+            try
+            {
+                this.tibcoSession.Unsubscribe(name);
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+            }
+        }
+
+        public IQueueBrowser CreateBrowser(IQueue queue)
+        {
+            Apache.NMS.EMS.Queue queueObj = (Apache.NMS.EMS.Queue) queue;
+
+            try
+            {
+                return EMSConvert.ToNMSQueueBrowser(this.tibcoSession.CreateBrowser(queueObj.tibcoQueue));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public IQueueBrowser CreateBrowser(IQueue queue, string selector)
+        {
+            Apache.NMS.EMS.Queue queueObj = (Apache.NMS.EMS.Queue) queue;
+
+            try
+            {
+                return EMSConvert.ToNMSQueueBrowser(this.tibcoSession.CreateBrowser(queueObj.tibcoQueue, selector));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IQueue GetQueue(string name)
+        {
+            try
+            {
+                return EMSConvert.ToNMSQueue(this.tibcoSession.CreateQueue(name));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.ITopic GetTopic(string name)
+        {
+            try
+            {
+                return EMSConvert.ToNMSTopic(this.tibcoSession.CreateTopic(name));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.ITemporaryQueue CreateTemporaryQueue()
+        {
+            try
+            {
+                return EMSConvert.ToNMSTemporaryQueue(this.tibcoSession.CreateTemporaryQueue());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.ITemporaryTopic CreateTemporaryTopic()
+        {
+            try
+            {
+                return EMSConvert.ToNMSTemporaryTopic(this.tibcoSession.CreateTemporaryTopic());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
+        /// </summary>
+        public void DeleteDestination(IDestination destination)
+        {
+            // TODO: Implement if possible.
+        }
+
+        public Apache.NMS.IMessage CreateMessage()
+        {
+            try
+            {
+                return EMSConvert.ToNMSMessage(this.tibcoSession.CreateMessage());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.ITextMessage CreateTextMessage()
+        {
+            try
+            {
+                return EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.ITextMessage CreateTextMessage(string text)
+        {
+            try
+            {
+                return EMSConvert.ToNMSTextMessage(this.tibcoSession.CreateTextMessage(text));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IMapMessage CreateMapMessage()
+        {
+            try
+            {
+                return EMSConvert.ToNMSMapMessage(this.tibcoSession.CreateMapMessage());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IBytesMessage CreateBytesMessage()
+        {
+            try
+            {
+                return EMSConvert.ToNMSBytesMessage(this.tibcoSession.CreateBytesMessage());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IBytesMessage CreateBytesMessage(byte[] body)
+        {
+            try
+            {
+                Apache.NMS.IBytesMessage bytesMessage = CreateBytesMessage();
+
+                if(null != bytesMessage)
+                {
+                    bytesMessage.Content = body;
+                }
+
+                return bytesMessage;
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IStreamMessage CreateStreamMessage()
+        {
+            try
+            {
+                return EMSConvert.ToNMSStreamMessage(this.tibcoSession.CreateStreamMessage());
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public Apache.NMS.IObjectMessage CreateObjectMessage(Object body)
+        {
+            try
+            {
+                return EMSConvert.ToNMSObjectMessage(this.tibcoSession.CreateObjectMessage(body));
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+                return null;
+            }
+        }
+
+        public void Commit()
+        {
+            try
+            {
+                this.tibcoSession.Commit();
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+            }
+        }
+
+        public void Rollback()
+        {
+            try
+            {
+                this.tibcoSession.Rollback();
+            }
+            catch(Exception ex)
+            {
+                ExceptionUtil.WrapAndThrowNMSException(ex);
+            }
+        }
+
+        public void Recover()
+        {
+            throw new NotSupportedException();
+        }
+
+        private ConsumerTransformerDelegate consumerTransformer;
+        /// <summary>
+        /// A Delegate that is called each time a Message is dispatched to allow the client to do
+        /// any necessary transformations on the received message before it is delivered.
+        /// The Session instance sets the delegate on each Consumer it creates.
+        /// </summary>
+        public ConsumerTransformerDelegate ConsumerTransformer
+        {
+            get { return this.consumerTransformer; }
+            set { this.consumerTransformer = value; }
+        }
+
+        private ProducerTransformerDelegate producerTransformer;
+        /// <summary>
+        /// A delegate that is called each time a Message is sent from this Producer which allows
+        /// the application to perform any needed transformations on the Message before it is sent.
+        /// The Session instance sets the delegate on each Producer it creates.
+        /// </summary>
+        public ProducerTransformerDelegate ProducerTransformer
+        {
+            get { return this.producerTransformer; }
+            set { this.producerTransformer = value; }
+        }
+
+        // Properties
+
+        /// <summary>
+        /// The default timeout for network requests.
+        /// </summary>
+        private TimeSpan requestTimeout = Apache.NMS.NMSConstants.defaultRequestTimeout;
+        public TimeSpan RequestTimeout
+        {
+            get { return this.requestTimeout; }
+            set { this.requestTimeout = value; }
+        }
+
+        public bool Transacted
+        {
+            get { return this.tibcoSession.Transacted; }
+        }
+
+        public Apache.NMS.AcknowledgementMode AcknowledgementMode
+        {
+            get { return EMSConvert.ToAcknowledgementMode(this.tibcoSession.SessionAcknowledgeMode); }
+        }
+
+        public void Close()
+        {
+            lock(this)
+            {
+                if(closed)
+                {
+                    return;
+                }
+
+                try
+                {
+                    this.tibcoSession.Close();
+                }
+                catch(Exception ex)
+                {
+                    ExceptionUtil.WrapAndThrowNMSException(ex);
+                }
+                finally
+                {
+                    closed = true;
+                }
+            }
+        }
+
+        #endregion
+
+        #region IDisposable Members
+
+        ///<summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+        ///</summary>
+        ///<filterpriority>2</filterpriority>
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        protected void Dispose(bool disposing)
+        {
+            if(disposed)
+            {
+                return;
+            }
+
+            if(disposing)
+            {
+                // Dispose managed code here.
+            }
+
+            try
+            {
+                Close();
+            }
+            catch
+            {
+                // Ignore errors.
+            }
 
-			disposed = true;
-		}
+            disposed = true;
+        }
 
-		#endregion
-	}
+        #endregion
+    }
 }

Modified: activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.MSMQ/trunk/src/main/csharp/Session.cs Fri Nov 11 20:58:59 2011
@@ -193,6 +193,11 @@ namespace Apache.NMS.MSMQ
             messageQueueTransaction.Abort();
         }
 
+        public void Recover()
+        {
+            throw new NotSupportedException();
+        }
+
         // Properties
         public Connection Connection
         {

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/nant-common.xml Fri Nov 11 20:58:59 2011
@@ -471,6 +471,7 @@
                 <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
                     <arg value="${NUnit.Projectfile}" />
                     <arg value="-labels" />
+                    <arg value="-exclude=LongRunning" />
                     <arg value="-xml=Nunit.TestOutput.xml" />
                 </exec>
             </if>

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs Fri Nov 11 20:58:59 2011
@@ -580,17 +580,14 @@ namespace Apache.NMS.Stomp
 
         public void BeforeMessageIsConsumed(MessageDispatch dispatch)
         {
-            if(!this.session.IsAutoAcknowledge)
+            lock(this.dispatchedMessages)
             {
-                lock(this.dispatchedMessages)
-                {
-                    this.dispatchedMessages.AddFirst(dispatch);
-                }
+                this.dispatchedMessages.AddFirst(dispatch);
+            }
 
-                if(this.session.IsTransacted)
-                {
-                    this.AckLater(dispatch);
-                }
+            if(this.session.IsTransacted)
+            {
+                this.AckLater(dispatch);
             }
         }
 
@@ -623,18 +620,25 @@ namespace Apache.NMS.Stomp
                     {
                         lock(this.dispatchedMessages)
                         {
-                            MessageAck ack = new MessageAck();
-
-                            ack.AckType = (byte) AckType.ConsumedAck;
-                            ack.ConsumerId = this.info.ConsumerId;
-                            ack.Destination = dispatch.Destination;
-                            ack.LastMessageId = dispatch.Message.MessageId;
-                            ack.MessageCount = 1;
+                            // If a Recover was called in the async handler then
+                            // we don't want to send an ack otherwise the broker will
+                            // think we consumed the message.
+                            if (this.dispatchedMessages.Count > 0)
+                            {
+                                MessageAck ack = new MessageAck();
+
+                                ack.AckType = (byte) AckType.ConsumedAck;
+                                ack.ConsumerId = this.info.ConsumerId;
+                                ack.Destination = dispatch.Destination;
+                                ack.LastMessageId = dispatch.Message.MessageId;
+                                ack.MessageCount = 1;
 
-                            this.session.SendAck(ack);
+                                this.session.SendAck(ack);
+                            }
                         }
 
                         this.deliveringAcks.Value = false;
+                        this.dispatchedMessages.Clear();
                     }
                 }
                 else if(this.session.IsClientAcknowledge || this.session.IsIndividualAcknowledge)
@@ -748,7 +752,7 @@ namespace Apache.NMS.Stomp
             }
         }
 
-        private void Commit()
+        internal void Commit()
         {
             lock(this.dispatchedMessages)
             {
@@ -758,12 +762,15 @@ namespace Apache.NMS.Stomp
             this.redeliveryDelay = 0;
         }
 
-        private void Rollback()
+        internal void Rollback()
         {
             lock(this.unconsumedMessages.SyncRoot)
             {
                 lock(this.dispatchedMessages)
                 {
+                    Tracer.DebugFormat("Rollback started, rolling back {0} message",
+                                       dispatchedMessages.Count);
+
                     if(this.dispatchedMessages.Count == 0)
                     {
                         return;
@@ -798,6 +805,7 @@ namespace Apache.NMS.Stomp
 
                         if(redeliveryDelay > 0 && !this.unconsumedMessages.Closed)
                         {
+                            Tracer.DebugFormat("Rollback delayed for {0} seconds", redeliveryDelay);
                             DateTime deadline = DateTime.Now.AddMilliseconds(redeliveryDelay);
                             ThreadPool.QueueUserWorkItem(this.RollbackHelper, deadline);
                         }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs Fri Nov 11 20:58:59 2011
@@ -119,7 +119,12 @@ namespace Apache.NMS.Stomp.Protocol
         {            
             StompFrame frame = new StompFrame(this.encodeHeaders);
             frame.FromStream(dataIn);
-            
+
+            if (Tracer.IsDebugEnabled)
+            {
+                Tracer.Debug("Unmarshalled frame: " + frame);
+            }
+
             Object answer = CreateCommand(frame);
             return answer;
         }
@@ -128,7 +133,7 @@ namespace Apache.NMS.Stomp.Protocol
         {
             string command = frame.Command;
 
-            if(Tracer.IsDebugEnabled)
+            if (Tracer.IsDebugEnabled)
             {
                 Tracer.Debug("StompWireFormat - Received " + frame.ToString());
             }

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs?rev=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs Fri Nov 11 20:58:59 2011
@@ -588,6 +588,24 @@ namespace Apache.NMS.Stomp
             this.TransactionContext.Rollback();
         }
 
+        public void Recover()
+        {
+            CheckClosed();
+
+            if (acknowledgementMode == AcknowledgementMode.Transactional)
+            {
+                throw new IllegalStateException("Cannot Recover a Transacted Session");
+            }
+
+            lock(this.consumers.SyncRoot)
+            {
+                foreach(MessageConsumer consumer in this.consumers.Values)
+                {
+                    consumer.Rollback();
+                }
+            }
+        }
+
         #endregion
 
         public void DoSend( Message message, MessageProducer producer, TimeSpan sendTimeout )
@@ -846,6 +864,14 @@ namespace Apache.NMS.Stomp
             }
         }
 
+        private void CheckClosed()
+        {
+            if(closed)
+            {
+                throw new IllegalStateException("The Session is Closed");
+            }
+        }
+
         /// <summary>
         /// Prevents message from throwing an exception if a client calls Acknoweldge on
         /// a message that is part of a transaction either being produced or consumed.  The

Added: 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=1201047&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs Fri Nov 11 20:58:59 2011
@@ -0,0 +1,268 @@
+/*
+ * 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.Stomp.Commands;
+using Apache.NMS.Test;
+using Apache.NMS.Util;
+using NUnit.Framework;
+
+namespace Apache.NMS.Stomp.Test
+{
+    [TestFixture]
+    public class NMSSessionRecoverTest : NMSTestSupport
+    {
+        private IConnection connection;
+        private IDestination destination;
+        private CountDownLatch doneCountDownLatch;
+        private ISession session;
+        private int counter;
+        private String errorMessage;
+
+        [SetUp]
+        public override void SetUp()
+        {
+            base.SetUp();
+
+            counter = 0;
+            errorMessage = null;
+            doneCountDownLatch = new CountDownLatch(1);
+            connection = CreateConnection();
+        }
+
+        [TearDown]
+        public override void TearDown()
+        {
+            base.TearDown();
+
+            if (connection != null)
+            {
+                connection.Close();
+            }
+        }
+
+        [Test]
+        public void TestQueueSynchRecover()
+        {
+            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+            DoTestSynchRecover();
+        }
+
+        [Test]
+        public void TestQueueAsynchRecover()
+        {
+            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+            DoTestAsynchRecover();
+        }
+
+        [Test]
+        public void TestTopicSynchRecover()
+        {
+            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+            DoTestSynchRecover();
+        }
+
+        [Test]
+        public void TestTopicAsynchRecover()
+        {
+            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+            DoTestAsynchRecover();
+        }
+
+        [Test]
+        public void TestQueueAsynchRecoverWithAutoAck()
+        {
+            destination = new Queue("Queue-" + DateTime.Now.Ticks);
+            DoTestAsynchRecoverWithAutoAck();
+        }
+
+        [Test]
+        public void TestTopicAsynchRecoverWithAutoAck()
+        {
+            destination = new Topic("Topic-" + DateTime.Now.Ticks);
+            DoTestAsynchRecoverWithAutoAck();
+        }
+
+        public void DoTestSynchRecover()
+        {
+            session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+            connection.Start();
+    
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            ITextMessage message = consumer.Receive(TimeSpan.FromMilliseconds(2000)) as ITextMessage;
+            Assert.AreEqual("First", message.Text);
+            Assert.IsFalse(message.NMSRedelivered);
+            message.Acknowledge();
+    
+            message = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(2000));
+            Assert.AreEqual("Second", message.Text);
+            Assert.IsFalse(message.NMSRedelivered);
+    
+            session.Recover();
+    
+            message = (ITextMessage)consumer.Receive(TimeSpan.FromMilliseconds(3000));
+            Assert.AreEqual("Second", message.Text);
+            Assert.IsTrue(message.NMSRedelivered);
+    
+            message.Acknowledge();
+        }
+
+        private void OnTestAsynchRecoverMessage(IMessage msg)
+        {
+            counter++;
+            try
+            {
+                ITextMessage message = msg as ITextMessage;
+                switch (counter)
+                {
+                case 1:
+                    Tracer.Debug("Got first Message: " + message.Text);
+                    Assert.AreEqual("First", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    message.Acknowledge();
+                    break;
+                case 2:
+                    Tracer.Debug("Got Second Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    session.Recover();
+                    break;
+                case 3:
+                    Tracer.Debug("Got Third Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsTrue(message.NMSRedelivered);
+                    message.Acknowledge();
+                    doneCountDownLatch.countDown();
+                    break;
+                default:
+                    errorMessage = "Got too many messages: " + counter;
+                    Tracer.Debug(errorMessage);
+                    doneCountDownLatch.countDown();
+                    break;
+                }
+            }
+            catch (Exception e)
+            {
+                errorMessage = "Got exception: " + e.Message;
+                Tracer.Warn("Exception on Message Receive: " + e.Message);
+                doneCountDownLatch.countDown();
+            }
+        }
+
+        public void DoTestAsynchRecover()
+        {
+            session = connection.CreateSession(AcknowledgementMode.ClientAcknowledge);
+
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+    
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            consumer.Listener += OnTestAsynchRecoverMessage;
+            connection.Start();
+
+            if (doneCountDownLatch.await(TimeSpan.FromSeconds(10)))
+            {
+                if (!String.IsNullOrEmpty(errorMessage))
+                {
+                    Assert.Fail(errorMessage);
+                }
+            }
+            else
+            {
+                Assert.Fail("Timeout waiting for async message delivery to complete.");
+            }
+        }
+
+        private void OnTestAsynchRecoverWithAutoAck(IMessage msg)
+        {
+            counter++;
+            try
+            {
+                ITextMessage message = msg as ITextMessage;
+                switch (counter)
+                {
+                case 1:
+                    Tracer.Debug("Got first Message: " + message.Text);
+                    Assert.AreEqual("First", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    break;
+                case 2:
+                    // This should rollback the delivery of this message..
+                    // and re-deliver.
+                    Tracer.Debug("Got Second Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsFalse(message.NMSRedelivered);
+                    session.Recover();
+                    break;
+                case 3:
+                    Tracer.Debug("Got Third Message: " + message.Text);
+                    Assert.AreEqual("Second", message.Text);
+                    Assert.IsTrue(message.NMSRedelivered);
+                    doneCountDownLatch.countDown();
+                    break;
+                default:
+                    errorMessage = "Got too many messages: " + counter;
+                    Tracer.Debug(errorMessage);
+                    doneCountDownLatch.countDown();
+                    break;
+                }
+            }
+            catch (Exception e)
+            {
+                errorMessage = "Got exception: " + e.Message;
+                Tracer.Warn("Exception on Message Receive: " + e.Message);
+                doneCountDownLatch.countDown();
+            }
+        }
+
+        public void DoTestAsynchRecoverWithAutoAck()
+        {
+            session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+            IMessageConsumer consumer = session.CreateConsumer(destination);
+
+            IMessageProducer producer = session.CreateProducer(destination);
+            producer.DeliveryMode = MsgDeliveryMode.NonPersistent;
+            producer.Send(session.CreateTextMessage("First"));
+            producer.Send(session.CreateTextMessage("Second"));
+
+            consumer.Listener += OnTestAsynchRecoverWithAutoAck;
+            connection.Start();
+
+            if (doneCountDownLatch.await(TimeSpan.FromSeconds(10)))
+            {
+                Tracer.Info("Finished waiting for async message delivery to complete.");
+                if (!String.IsNullOrEmpty(errorMessage))
+                {
+                    Assert.Fail(errorMessage);
+                }
+            }
+            else
+            {
+                Tracer.Warn("Timeout waiting for async message delivery to complete.");
+                Assert.Fail("Timeout waiting for async message delivery to complete.");
+            }
+        }
+    }
+}
+

Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NMSSessionRecoverTest.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs?rev=1201047&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs Fri Nov 11 20:58:59 2011
@@ -0,0 +1,75 @@
+/*
+ * 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.Stomp.Test
+{
+	public class NmsConsoleTracer : Apache.NMS.ITrace
+	{
+		#region ITrace Members
+		public void Debug(string message)
+		{
+			System.Console.WriteLine(string.Format("DEBUG: {0}", message));
+		}
+
+		public void Error(string message)
+		{
+			System.Console.WriteLine(string.Format("ERROR: {0}", message));
+		}
+
+		public void Fatal(string message)
+		{
+			System.Console.WriteLine(string.Format("FATAL: {0}", message));
+		}
+
+		public void Info(string message)
+		{
+			System.Console.WriteLine(string.Format("INFO: {0}", message));
+		}
+
+		public void Warn(string message)
+		{
+			System.Console.WriteLine(string.Format("WARN: {0}", 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; }
+		}
+
+		#endregion
+	}
+}

Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/test/csharp/NmsConsoleTracer.cs
------------------------------------------------------------------------------
    svn:eol-style = native

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=1201047&r1=1201046&r2=1201047&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 Fri Nov 11 20:58:59 2011
@@ -55,24 +55,17 @@
     <NoWarn>3016</NoWarn>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Apache.NMS, Version=1.5.1.2341, 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, Version=1.5.1.2341, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>lib\Apache.NMS\net-2.0\Apache.NMS.Test.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Xml" />
-    <Reference Include="nunit.framework, Version=2.5.8.10295, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
-      <SpecificVersion>False</SpecificVersion>
+    <Reference Include="nunit.framework">
       <HintPath>lib\NUnit\mono-2.0\nunit.framework.dll</HintPath>
     </Reference>
-    <Reference Include="Apache.NMS.Test, Version=1.6.0.2216, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
+    <Reference Include="Apache.NMS.Test">
       <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.Test.dll</HintPath>
     </Reference>
+    <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">
@@ -99,7 +92,7 @@
       <Properties>
         <Policies>
           <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
-          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="Apache2License" />
+          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" IncludeInNewFiles="True" />
         </Policies>
       </Properties>
     </MonoDevelop>
@@ -126,5 +119,7 @@
     <Compile Include="src\test\csharp\Commands\ConsumerIdTest.cs" />
     <Compile Include="src\test\csharp\Commands\ProducerIdTest.cs" />
     <Compile Include="src\test\csharp\SpecialCharactersTest.cs" />
+    <Compile Include="src\test\csharp\NMSSessionRecoverTest.cs" />
+    <Compile Include="src\test\csharp\NmsConsoleTracer.cs" />
   </ItemGroup>
 </Project>
\ No newline at end of file

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=1201047&r1=1201046&r2=1201047&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj Fri Nov 11 20:58:59 2011
@@ -1,4 +1,4 @@
-<?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>
@@ -55,8 +55,7 @@
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Xml" />
-    <Reference Include="Apache.NMS, Version=1.4.0.2049, Culture=neutral, PublicKeyToken=82756feee3957618">
-      <SpecificVersion>False</SpecificVersion>
+    <Reference Include="Apache.NMS">
       <HintPath>lib\Apache.NMS\mono-2.0\Apache.NMS.dll</HintPath>
     </Reference>
   </ItemGroup>
@@ -177,7 +176,7 @@
       <Properties>
         <Policies>
           <TextStylePolicy FileWidth="120" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" inheritsScope="text/plain" />
-          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" inheritsSet="Apache2License" />
+          <StandardHeader Text="/*&#xA; * Licensed to the Apache Software Foundation (ASF) under one or more&#xA; * contributor license agreements.  See the NOTICE file distributed with&#xA; * this work for additional information regarding copyright ownership.&#xA; * The ASF licenses this file to You under the Apache License, Version 2.0&#xA; * (the &quot;License&quot;); you may not use this file except in compliance with&#xA; * the License.  You may obtain a copy of the License at&#xA; *&#xA; *     http://www.apache.org/licenses/LICENSE-2.0&#xA; *&#xA; * Unless required by applicable law or agreed to in writing, software&#xA; * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#xA; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#xA; * See the License for the specific language governing permissions and&#xA; * limitations under the License.&#xA; */&#xA;" IncludeInNewFiles="True" />
         </Policies>
       </Properties>
     </MonoDevelop>



Mime
View raw message