You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2014/03/19 20:15:45 UTC

[jira] [Updated] (QPID-5586) qpid::messaging::Session::nextReceiver needs to be able to throw a distinct exception if the session is closed

     [ https://issues.apache.org/jira/browse/QPID-5586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Stitcher updated QPID-5586:
----------------------------------

    Summary: qpid::messaging::Session::nextReceiver needs to be able to throw a distinct exception if the session is closed  (was: qpid::messaging::Session::nextReceiver can throw exception not descended from qpid::types::Exception)

> qpid::messaging::Session::nextReceiver needs to be able to throw a distinct exception if the session is closed
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-5586
>                 URL: https://issues.apache.org/jira/browse/QPID-5586
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>    Affects Versions: 0.26, 0.27
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>             Fix For: 0.27
>
>
> If a qpid messaging connection or (I think) a session is closed in one thread whilst another thread is in Session::nextReceiver(...) then qpid::ClosedException will be thrown.
> This is definitely wrong! (There is no way to catch this exception using only the messaging library).
> It seems that there needs to be a new qpid::messaging exception to cover the case that you were waiting for a receiver and the whole session has gone away. Certainly you need to know that you can't refer to the session any more.
> It cannot be sufficient to assert that you must keep sessions around until all the nextReceiver() calls using them are finished with the current API as there is no way to preempt those calls externally. So a service loop waiting to for a receiver to process will be stuck waiting until the session closes. Even if you poll by using timeouts there is no way on return to tell that the session you were just listening on is dead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org