[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] testing if connected



Cyrille wrote:

Hello,
nice, server is coming back.

I would like to know if a XmlBlasterConnection opened for a long time is
reusable, or if have to reconnect.
Protocol used is CORBA.

XmlBlasterConnection could come down because of a session timeout, a
network disconnection, ...

I would like to test the availability of a connection before calling
some get(), erase(), ...methods.

XmlBlasterConnection.ping() return void and doesn't throw exception.
XmlBlasterConnection.isLogin() I don't know if it is check the
availability of the XmlBlasterConnection.

Perhaps I've to make a get() one a server variable ...

What do you think about that ??

The ping has this CORBA syntax:

  string ping(in string qos);

You will get a CORBA exception if ping fails.
I believe the same happens with XmlRpc etc.

Further, ping tests on application level if the server
is able to respond the ping() request.

XmlBlasterConnection automatically pings xmlBlaster.
On error the client is notified (see HelloWorld4.java)
You can adjust the ping interval with

-pingInterval Pinging every given milliseconds [10000]
-retries How often to retry if connection fails (-1 is forever) [-1]
-delay Delay between connection retries in milliseconds [0]
A delay value > 0 switches fails save mode on, 0 switches it off


regards,

Marcel