You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Artem <ar...@tut.by> on 2016/11/03 16:02:00 UTC

How close session if the client did not do it?

Hello!

I`m using simple Proton-J server that based in this   exmaple
<https://github.com/apache/qpid-proton/blob/master/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java> 
. 

For  personal reasons I save sessions at list and remove it from list at 
onSessionLocalClose / onSessionRemoteClose events. 

But if my client was disconnected after some exception and also does not
close session in finally section i haven`t got any event that can tell me
that some session from the list was closed. How i can understand that
session was closed in this case?

Thanks,
Artem 



--
View this message in context: http://qpid.2158936.n2.nabble.com/How-close-session-if-the-client-did-not-do-it-tp7653097.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

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


Re: How close session if the client did not do it?

Posted by Robbie Gemmell <ro...@gmail.com>.
In that scenario there is no event that the session was closed since
it wasnt explicitly. You need to clean up the implicit closure of
resources on a given connection while you are dealing with the the
fact the connection has disconnected abruptly. Presumably allowing for
such things is among the reasons you save the sessions?

On 3 November 2016 at 16:02, Artem <ar...@tut.by> wrote:
> Hello!
>
> I`m using simple Proton-J server that based in this   exmaple
> <https://github.com/apache/qpid-proton/blob/master/examples/engine/java/src/main/java/org/apache/qpid/proton/examples/Driver.java>
> .
>
> For  personal reasons I save sessions at list and remove it from list at
> onSessionLocalClose / onSessionRemoteClose events.
>
> But if my client was disconnected after some exception and also does not
> close session in finally section i haven`t got any event that can tell me
> that some session from the list was closed. How i can understand that
> session was closed in this case?
>
> Thanks,
> Artem
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/How-close-session-if-the-client-did-not-do-it-tp7653097.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

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