[ 
https://issues.apache.org/jira/browse/QPID-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034013#comment-13034013
 ] 

Rajith Attapattu commented on QPID-3259:
----------------------------------------

"The other issue in this case is that AMQException.isHardError always returns 
true and hence the connection tried to close all sessions inside 
exceptionReceived method. I think there is something wrong here as an 
unauthorized operation in one session should not lead to closing all other 
sessions."

I also have mixed feelings about the above and have raised that issue on the 
dev list.
However after speaking to Robert Godfrey I agree that in some cases the only 
way to know a session error is if it's notified via the Connection Listener.
(In JMS there is no way to report a session exception if the client is in a 
passive mode, ex using a message listener).

Therefore the alternative is to notify such an error via the Connection 
Listener. In the case where multiple sessions are used, this does have the 
unintended result of all sessions for that connection being closed. But in a 
case where there is only one session, a session exception is as fatal as a 
connection level exception. If this goes unreported when a client is say using 
a Message listener, the client maybe waiting for messages that will never 
arrive bcos the underlying session is closed. So considering all these facts I 
believe that the connection being closed is a necessary inconvenience to avoid 
a more serious issue. 

> Deadlock on Java client side while closing session when topic operation is 
> unauthorized
> ---------------------------------------------------------------------------------------
>
>                 Key: QPID-3259
>                 URL: https://issues.apache.org/jira/browse/QPID-3259
>             Project: Qpid
>          Issue Type: Bug
>         Environment: Java client runs into a deadlock when it tries to close 
> session when a topic operation (publish/subscribe) is not authorized.
> In this situation AMQConnection (in exceptionReceived) tries to grab failover 
> mutext and runs into a lock. 
> The other issue in this case is that AMQException.isHardError always returns 
> true and hence the connection tried to close all sessions inside 
> exceptionReceived method. I think there is something wrong here as an 
> unauthorized operation in one session should not lead to closing all other 
> sessions.
>            Reporter: Danushka Menikkumbura
>            Priority: Critical
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to