I have changed the code for BayeuxClient by changing the code for
setInitialized(boolean b).
I understand this is possibly not the right place for the call of
RemoveListener, but this works for me. I can now react on a lost
connection and rebuild the connection in a proper way.
Is there a way to get (similar) behaviour in the next release of
cometd-java-client? Is there something I can do to help?
cheers,
Richard.
p.s. My change to BayeuxClient.java (I changed version 1.0.beta8 )
/* ------------------------------------------------------------ */
/**
* False when we have received a success=false message in response
to a
* Connect, or we have had an exception when sending or receiving
a Connect.
* True when handshake and then connect has happened.
*
* @param b
*/
protected void setInitialized(boolean b) {
synchronized (_outQ) {
_initialized = b;
if (!_initialized) {
for (RemoveListener r : _rListeners) {
r.removed(_clientId, false);