Author: jgomes
Date: Wed Oct 14 17:22:44 2015
New Revision: 1708656
URL: http://svn.apache.org/viewvc?rev=1708656&view=rev
Log:
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)
Modified:
activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/ (props changed)
activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs
Propchange: activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 17:22:44 2015
@@ -1,2 +1,2 @@
/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.5.x:1172914
-/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382,1707414
+/activemq/activemq-dotnet/Apache.NMS.EMS/trunk:1705382,1707414,1708655
Modified:
activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs
URL:
http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs?rev=1708656&r1=1708655&r2=1708656&view=diff
==============================================================================
---
activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs
(original)
+++
activemq/activemq-dotnet/Apache.NMS.EMS/branches/1.7.x/src/main/csharp/ConnectionFactory.cs
Wed Oct 14 17:22:44 2015
@@ -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);
}
}
}