activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Gomes (JIRA)" <jira+amq...@apache.org>
Subject [jira] Commented: (AMQNET-147) Connection fails to close if a producer or consumer has not been disposed (only when using the failover transport).
Date Fri, 27 Feb 2009 22:01:59 GMT

    [ https://issues.apache.org/activemq/browse/AMQNET-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50104#action_50104
] 

Jim Gomes commented on AMQNET-147:
----------------------------------

Daniel,

What do you think of this change to the handling of ConnectionError in the Connection.cs file
instead of just sending the output to Tracer?  I have not tested this yet, but will be running
through some tests shortly.

{code:title=Connection Snippet|borderStyle=solid}
else if(command is ConnectionError)
{
	if(!closing && !closed)
	{
		ConnectionError connectionError = (ConnectionError) command;
		BrokerError brokerError = connectionError.Exception;
		string message = "Broker connection error.";
		string cause = "";

		if(null != brokerError)
		{
			message = brokerError.Message;
			if(null != brokerError.Cause)
			{
				cause = brokerError.Cause.Message;
			}
		}

		OnException(commandTransport, new NMSConnectionException(message, cause));
	}
}
{code}


> Connection fails to close if a producer or consumer has not been disposed (only when
using the failover transport).
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-147
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-147
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1
>         Environment: Using failover transport
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.1
>
>         Attachments: CloseSessionAfterEverythingElse.patch, ConnectionError.patch, ConnectionsTests.patch
>
>
> When using the failover transport such as:-
> <defaultURI value="activemq:failover:(tcp://activemqhost:61616,tcp://activemqhost:61616)"/>
> A connection will fail to close if you dispose a connection before disposing a consumer
or producer that is associated with the connection.  The dispose call never returns because
the failover transport is continually reconnecting due to a KeyNotFoundException.  The KeyNotfoundException
is thrown because a session no longer exists in the connection state.
> A number of the existing unit tests fail (actually they never return) when using the
failover transport.  When in debug, a DebugAssert is displayed for each error that causes
the reconnect.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message