activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [23/25] activemq-nms-ems git commit: 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)
Date Tue, 07 Mar 2017 15:34:10 GMT
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/3dd2c9fe
Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/tree/3dd2c9fe
Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-ems/diff/3dd2c9fe

Branch: refs/heads/master
Commit: 3dd2c9feb81cd5dd7060347b6ea06d8dce48422f
Parents: 568c71e
Author: Jim Gomes <jgomes@apache.org>
Authored: Wed Oct 14 17:21:47 2015 +0000
Committer: Jim Gomes <jgomes@apache.org>
Committed: Wed Oct 14 17:21:47 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/3dd2c9fe/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);
 							}
 						}
 					}


Mime
View raw message