You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Bill Whiting <te...@bellsouth.net> on 2009/07/28 15:54:29 UTC

Valid Session

In the C++ api, is there a method for determining if a session is open 
and valid?  or is the session assumed to be valid if   
connection.isOpen() is "true"?

//Bill

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Valid Session

Posted by Bill Whiting <te...@bellsouth.net>.
On 07/28/2009 10:09 AM, Gordon Sim wrote:
> Bill Whiting wrote:
>> In the C++ api, is there a method for determining if a session is 
>> open and valid?  or is the session assumed to be valid if   
>> connection.isOpen() is "true"?
>
> There is now an isValid() method on the session (it didn't make it 
> into 0.5 however), but it only tests that the handle is valid, it 
> doesn't imply that the session is still open. To test the session is 
> actually working still you could do a sync() call after calling 
> isValid().
Thanks,  I like the idea of a sync() in a try catch block.  That will 
work for now and I'll add isValid() when that is available.

//Bill

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Valid Session

Posted by Gordon Sim <gs...@redhat.com>.
Bill Whiting wrote:
> In the C++ api, is there a method for determining if a session is open 
> and valid?  or is the session assumed to be valid if   
> connection.isOpen() is "true"?

There is now an isValid() method on the session (it didn't make it into 
0.5 however), but it only tests that the handle is valid, it doesn't 
imply that the session is still open. To test the session is actually 
working still you could do a sync() call after calling isValid().

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org