Author: tabish Date: Mon Aug 18 13:58:29 2014 New Revision: 1618609 URL: http://svn.apache.org/r1618609 Log: https://issues.apache.org/jira/browse/AMQNET-454
apply: https://issues.apache.org/jira/secure/attachment/12662486/Apache.NMS.AMQP-29-stop-sessions-before-connection.patch Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageProducer.cs Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Connection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Connection.cs?rev=1618609&r1=1618608&r2=1618609&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Connection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/Connection.cs Mon Aug 18 13:58:29 2014 @@ -122,9 +122,6 @@ namespace Apache.NMS.Amqp /// </summary> public void Stop() { - // Close qpidConnection - CheckDisconnected(); - // Administratively close NMS objects if (started.CompareAndSet(true, false)) { @@ -134,6 +131,9 @@ namespace Apache.NMS.Amqp session.Stop(); } } + + // Close qpidConnection + CheckDisconnected(); } #endregion Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageConsumer.cs?rev=1618609&r1=1618608&r2=1618609&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageConsumer.cs Mon Aug 18 13:58:29 2014 @@ -116,13 +116,14 @@ namespace Apache.NMS.Amqp { try { + Tracer.DebugFormat("Stop Consumer Id = " + ConsumerId); qpidReceiver.Close(); qpidReceiver.Dispose(); qpidReceiver = null; } catch (Org.Apache.Qpid.Messaging.QpidException e) { - throw new NMSException("Failed to close session with Id " + ConsumerId.ToString() + " : " + e.Message); + throw new NMSException("Failed to close consumer with Id " + ConsumerId.ToString() + " : " + e.Message); } } } Modified: activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageProducer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageProducer.cs?rev=1618609&r1=1618608&r2=1618609&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageProducer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.AMQP/trunk/src/main/csharp/MessageProducer.cs Mon Aug 18 13:58:29 2014 @@ -109,7 +109,7 @@ namespace Apache.NMS.Amqp } catch (Org.Apache.Qpid.Messaging.QpidException e) { - throw new NMSException("Failed to close session with Id " + ProducerId.ToString() + " : " + e.Message); + throw new NMSException("Failed to close producer with Id " + ProducerId.ToString() + " : " + e.Message); } } }
