activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1063905 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp: MessageConsumer.cs Session.cs
Date Wed, 26 Jan 2011 22:39:59 GMT
Author: tabish
Date: Wed Jan 26 22:39:59 2011
New Revision: 1063905

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

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs

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=1063905&r1=1063904&r2=1063905&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 Wed
Jan 26 22:39:59 2011
@@ -55,8 +55,8 @@ namespace Apache.NMS.Stomp
         private bool inProgressClearRequiredFlag;
 
         private event MessageListener listener;
-
         private IRedeliveryPolicy redeliveryPolicy;
+        private Exception failureError;
 
         // Constructor internal to prevent clients from creating an instance.
         internal MessageConsumer(Session session, ConsumerInfo info)
@@ -534,7 +534,14 @@ namespace Apache.NMS.Stomp
                     }
                     else
                     {
-                        return null;
+                        if(this.failureError != null)
+                        {
+                            throw NMSExceptionSupport.Create(FailureError);
+                        }
+                        else
+                        {
+                            return null;
+                        }
                     }
                 }
                 else if(dispatch.Message == null)
@@ -882,6 +889,12 @@ namespace Apache.NMS.Stomp
             }
         }
 
+        public Exception FailureError
+        {
+            get { return this.failureError; }
+            set { this.failureError = value; }
+        }
+
         #region Nested ISyncronization Types
 
         class MessageConsumerSynchronization : ISynchronization

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=1063905&r1=1063904&r2=1063905&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 Wed Jan 26
22:39:59 2011
@@ -303,6 +303,7 @@ namespace Apache.NMS.Stomp
                     {
                         foreach(MessageConsumer consumer in consumers.Values)
                         {
+                            consumer.FailureError = this.connection.FirstFailureError;
                             consumer.DoClose();
                         }
                     }



Mime
View raw message