Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A086C200C59 for ; Tue, 7 Mar 2017 00:29:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9F651160B76; Mon, 6 Mar 2017 23:29:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1606E160B96 for ; Tue, 7 Mar 2017 00:29:27 +0100 (CET) Received: (qmail 21146 invoked by uid 500); 6 Mar 2017 23:29:26 -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 20480 invoked by uid 99); 6 Mar 2017 23:29:26 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Mar 2017 23:29:26 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EA98ADFBD9; Mon, 6 Mar 2017 23:29:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tabish@apache.org To: commits@activemq.apache.org Date: Mon, 06 Mar 2017 23:29:45 -0000 Message-Id: <03327b782acf4c7ca86c142c44d3f18f@git.apache.org> In-Reply-To: <4eb312cf45504de28dfef7461a3790f9@git.apache.org> References: <4eb312cf45504de28dfef7461a3790f9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/50] [abbrv] activemq-nms-stomp git commit: Merged archived-at: Mon, 06 Mar 2017 23:29:29 -0000 Merged fix for: https://issues.apache.org/jira/browse/AMQNET-314 fix for: https://issues.apache.org/jira/browse/AMQNET-313 Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/commit/d64215a2 Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/tree/d64215a2 Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/diff/d64215a2 Branch: refs/heads/1.5.x Commit: d64215a29420cf611127a25768c51bb03eb7029a Parents: c036806 Author: Timothy A. Bish Authored: Wed Jan 26 22:52:30 2011 +0000 Committer: Timothy A. Bish Committed: Wed Jan 26 22:52:30 2011 +0000 ---------------------------------------------------------------------- src/main/csharp/MessageConsumer.cs | 19 ++++++++++++++++--- src/main/csharp/Session.cs | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d64215a2/src/main/csharp/MessageConsumer.cs ---------------------------------------------------------------------- diff --git a/src/main/csharp/MessageConsumer.cs b/src/main/csharp/MessageConsumer.cs index 27c8b2f..0d0885e 100755 --- a/src/main/csharp/MessageConsumer.cs +++ b/src/main/csharp/MessageConsumer.cs @@ -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 http://git-wip-us.apache.org/repos/asf/activemq-nms-stomp/blob/d64215a2/src/main/csharp/Session.cs ---------------------------------------------------------------------- diff --git a/src/main/csharp/Session.cs b/src/main/csharp/Session.cs index 6770283..63ed02d 100755 --- a/src/main/csharp/Session.cs +++ b/src/main/csharp/Session.cs @@ -303,6 +303,7 @@ namespace Apache.NMS.Stomp { foreach(MessageConsumer consumer in consumers.Values) { + consumer.FailureError = this.connection.FirstFailureError; consumer.DoClose(); } }