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

Re: [xmlblaster] Client connection not being restored properly?



Hi David,

I think your solution is to keep the server session alive by setting
the session to unlimited.

Further Notes:
You could call xmlBlasterAccess.refreshSession()
to refresh the server side session (but this can fail if the network is
broken and the refresh is not reaching the server in time).

If you don't want to use an unlimited server session you need to
destroy the XmlBlasterAccess instance (without deleting the client queue entries)
when going to DEAD (xmlBlasterAccess.disconnect(disConnectQos)).
Use a disConnectQos.clearClientQueue(false) to keep the entries.
Re-establish the connection with a new XmlBlasterAccess instance
which then sends the existing queue entries.
However - this will, i think, not work if you use a RAM,1.0 queue (no DB).


As said in the last mail, XmlBlasterAccess behavior is fishy after going to DEAD,
which needs to be fixed by us.
We more clearly need to invalidate the XmlBlasterAccess instance in this case.


And finally:
If your scenario is a use case which we should support we
can think of changing the client library behavior so that a
server session timeout triggers a POLLING (and not a DEAD)
which would solve your case. Is there any logical reason
to keep the to-DEAD pattern (Michele?)

regards
Marcel


David Kerry wrote:
On Wed, Apr 02, 2008 at 07:42:54PM +0200, Marcel Ruff wrote:
Hi David,

if the server side session times out the expected behavior is
that the client goes to dead (what you client seem to do).
That your client recovers from DEAD is not intended
and is considered a bug, see
http://www.xmlblaster.org/xmlBlaster/doc/requirements/client.failsafe.html#failsave
The transition (9) and (8) should not happen.


Thanks for reporting
best regards
Marcel

Hi Marcel,

Whoops!

Then I guess the original issue is still outstanding then.

If my client goes from ALIVE->DEAD, simply because of a session
timeout on the server side, what are my options on the client
side to reconnect gracefully and to prevent the loss of the
messages still queued on the client side?

The client still happily accepts messages for queueing even
though the connection state is DEAD and returns no errors.

-- Marcel Ruff http://www.xmlBlaster.org http://watchee.net Phone: +49 7551 309371