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 B834C200C30 for ; Tue, 7 Mar 2017 16:33:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B6E83160B5F; Tue, 7 Mar 2017 15:33:51 +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 3BEF6160B97 for ; Tue, 7 Mar 2017 16:33:50 +0100 (CET) Received: (qmail 63048 invoked by uid 500); 7 Mar 2017 15:33:49 -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 62805 invoked by uid 99); 7 Mar 2017 15:33:49 -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; Tue, 07 Mar 2017 15:33:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C42F8DFF09; Tue, 7 Mar 2017 15:33:48 +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: Tue, 07 Mar 2017 15:34:11 -0000 Message-Id: <68c5ce0c66454a4a8cd61026c6283879@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [24/25] activemq-nms-ems git commit: Merged revision(s) 1708655 from activemq/activemq-dotnet/Apache.NMS.EMS/trunk: Update existing TIBCO factory connection when changing the exception settings. Refactor the parsing of connection URL into single function archived-at: Tue, 07 Mar 2017 15:33:51 -0000 Merged revision(s) 1708655 from activemq/activemq-dotnet/Apache.NMS.EMS/trunk: Update existing TIBCO factory connection when changing the exception settings. Refactor the parsing of connection URL into single function. Fixes [AMQNET-511]. (See https://issues.apache.org/jira/browse/AMQNET-511) Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/commit/52adfd36 Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/tree/52adfd36 Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/diff/52adfd36 Branch: refs/heads/1.7.x Commit: 52adfd362663d81f9e7fefdf5652a1298f3b7ee8 Parents: f4dbe8e Author: Jim Gomes Authored: Wed Oct 14 17:22:44 2015 +0000 Committer: Jim Gomes Committed: Wed Oct 14 17:22:44 2015 +0000 ---------------------------------------------------------------------- src/main/csharp/ConnectionFactory.cs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/blob/52adfd36/src/main/csharp/ConnectionFactory.cs ---------------------------------------------------------------------- diff --git a/src/main/csharp/ConnectionFactory.cs b/src/main/csharp/ConnectionFactory.cs index ba5959c..2b7f10b 100644 --- a/src/main/csharp/ConnectionFactory.cs +++ b/src/main/csharp/ConnectionFactory.cs @@ -89,11 +89,9 @@ namespace Apache.NMS.EMS { try { - this.brokerUri = ParseUriProperties(serverUrl); - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), clientId, properties); this.clientId = clientId; this.properties = properties; - ConfigureConnectionFactory(); + this.BrokerUri = serverUrl; } catch(Exception ex) { @@ -133,13 +131,21 @@ namespace Apache.NMS.EMS public bool ExceptionOnFTEvents { get { return this.exceptionOnFTEvents; } - set { this.exceptionOnFTEvents = value; } + set + { + this.exceptionOnFTEvents = value; + TIBCO.EMS.Tibems.SetExceptionOnFTEvents(value); + } } public bool ExceptionOnFTSwitch { get { return this.exceptionOnFTSwitch; } - set { this.exceptionOnFTSwitch = value; } + set + { + this.exceptionOnFTSwitch = value; + TIBCO.EMS.Tibems.SetExceptionOnFTSwitch(value); + } } public int ConnAttemptCount @@ -251,19 +257,21 @@ namespace Apache.NMS.EMS } else { + string brokerPath = TrimParens(this.brokerUri.AbsolutePath); + if(null == this.clientId) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath)); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath); } else { if(null == this.properties) { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath, this.clientId); } else { - this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(TrimParens(this.brokerUri.AbsolutePath), this.clientId, this.properties); + this.tibcoConnectionFactory = new TIBCO.EMS.ConnectionFactory(brokerPath, this.clientId, this.properties); } } }