You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by astepanenko <an...@gmail.com> on 2007/04/09 22:51:56 UTC

Know the session was closed

Hello,

is there a way to know that Session was closed, something like isClosed()
method? I cannot find one.
So, currently the only way to know the session was closed (either
intentionally or due to a network problem) is to get an Exception trying to
use the Session.

Thank you,
Andrew
-- 
View this message in context: http://www.nabble.com/Know-the-session-was-closed-tf3549541s2354.html#a9909368
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Know the session was closed

Posted by astepanenko <an...@gmail.com>.
Thank you, James!

That tiny method would be really handy.
I'll look at how to submit a patch and will try to provide one.

Andrew.


James.Strachan wrote:
> 
> On 4/9/07, astepanenko <an...@gmail.com> wrote:
>>
>> Hello,
>>
>> is there a way to know that Session was closed, something like isClosed()
>> method? I cannot find one.
>> So, currently the only way to know the session was closed (either
>> intentionally or due to a network problem) is to get an Exception trying
>> to
>> use the Session.
> 
> There's a protected closed flag already on ActiveMQSession. If you
> want to submit a patch it'd be easy to expose this as a public
> property
> http://activemq.apache.org/contributing.html
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/Know-the-session-was-closed-tf3549541s2354.html#a9910882
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Know the session was closed

Posted by James Strachan <ja...@gmail.com>.
On 4/9/07, astepanenko <an...@gmail.com> wrote:
>
> Hello,
>
> is there a way to know that Session was closed, something like isClosed()
> method? I cannot find one.
> So, currently the only way to know the session was closed (either
> intentionally or due to a network problem) is to get an Exception trying to
> use the Session.

There's a protected closed flag already on ActiveMQSession. If you
want to submit a patch it'd be easy to expose this as a public
property
http://activemq.apache.org/contributing.html

-- 

James
-------
http://radio.weblogs.com/0112098/