activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1560466 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x: ./ src/main/csharp/Connection.cs
Date Wed, 22 Jan 2014 18:36:25 GMT
Author: tabish
Date: Wed Jan 22 18:36:24 2014
New Revision: 1560466

URL: http://svn.apache.org/r1560466
Log:
https://issues.apache.org/jira/browse/AMQNET-467

CheckConnected was not processing error responses that contained security exceptions. 

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Connection.cs

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/
------------------------------------------------------------------------------
  Merged /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:r1560463

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Connection.cs?rev=1560466&r1=1560465&r2=1560466&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Connection.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.6.x/src/main/csharp/Connection.cs
Wed Jan 22 18:36:24 2014
@@ -846,6 +846,9 @@ namespace Apache.NMS.ActiveMQ
 					ExceptionResponse exceptionResponse = (ExceptionResponse) response;
 					Exception exception = CreateExceptionFromBrokerError(exceptionResponse.Exception);
 
+                    Tracer.DebugFormat("Error returned for request {0} error type: {1}",
+                                       command, exception);
+
 					// Security exception on connect means this Connection is unusable, close the
 					// transport now to free its resources.
 					if (exception is NMSSecurityException && command.IsConnectionInfo)
@@ -983,7 +986,19 @@ namespace Apache.NMS.ActiveMQ
 										{
 											ExceptionResponse error = response as ExceptionResponse;
 											NMSException exception = CreateExceptionFromBrokerError(error.Exception);
-											if(exception is InvalidClientIDException)
+                                            if (exception is NMSSecurityException)
+                                            {
+                                                try
+                                                {
+                                                    transport.Dispose();
+                                                }
+                                                catch
+                                                {
+                                                }
+
+                                                throw exception;
+                                            }
+											else if(exception is InvalidClientIDException)
 											{
 												// This is non-recoverable.
 												// Shutdown the transport connection, and re-create it, but don't start it.



Mime
View raw message