Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 53654 invoked from network); 26 Jan 2011 22:52:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2011 22:52:54 -0000 Received: (qmail 68024 invoked by uid 500); 26 Jan 2011 22:52:54 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 67956 invoked by uid 500); 26 Jan 2011 22:52:53 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 67949 invoked by uid 99); 26 Jan 2011 22:52:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 22:52:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 22:52:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id ACF6523889E1; Wed, 26 Jan 2011 22:52:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1063912 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp: MessageConsumer.cs Session.cs Date: Wed, 26 Jan 2011 22:52:30 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110126225230.ACF6523889E1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Wed Jan 26 22:52:30 2011 New Revision: 1063912 URL: http://svn.apache.org/viewvc?rev=1063912&view=rev Log: Merged fix for: https://issues.apache.org/jira/browse/AMQNET-314 fix for: https://issues.apache.org/jira/browse/AMQNET-313 Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/MessageConsumer.cs activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/Session.cs Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/MessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/MessageConsumer.cs?rev=1063912&r1=1063911&r2=1063912&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/MessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/MessageConsumer.cs Wed Jan 26 22:52:30 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) @@ -878,10 +885,16 @@ namespace Apache.NMS.Stomp { if(this.listener != null) { - throw new NMSException("Cannot set Async listeners on Consumers with a prefetch limit of zero"); + throw new NMSException("Cannot perform a Synchronous Receive when there is a registered asynchronous listener."); } } + 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/branches/1.5.x/src/main/csharp/Session.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/Session.cs?rev=1063912&r1=1063911&r2=1063912&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/Session.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.5.x/src/main/csharp/Session.cs Wed Jan 26 22:52:30 2011 @@ -303,6 +303,7 @@ namespace Apache.NMS.Stomp { foreach(MessageConsumer consumer in consumers.Values) { + consumer.FailureError = this.connection.FirstFailureError; consumer.DoClose(); } }