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

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



On Mon, Mar 10, 2008 at 11:10:54AM +0100, Marcel Ruff wrote:
> Hi David,
> 
> fail safe mode should also set a positive session id,
> like this the client queue is found again on restart and
> you don't need another queue to store the entries.
> 
> Something like
> 
> java -Dcom.sun.management.jmxremote javaclients.HelloWorldSubscribe 
> -session.name subscriber/1 -dispatch/callback/retries -1 
> -connect/qos/persistent true -persistentSubscribe true
> 
> The persistent settings are only needed to recover from server restart 
> and to not
> loose a message if a publisher reconnects and publishes earlier,
> before our subscriber reconnects and re-subscribes.
> 
> best regards,
> Marcel
> 

Hi Marcel,

Something's still fishy here.  Although I'm not setting a persistent
queue (I'm not concerned about queued incoming messages while disconnected
right now), I am setting all the other parameters for a failsafe 
connection (callback retries -1, positive session id).

I've setup my client to be notified of connection state via the
I_ConnectionStateListener interface.

When I attempt to publish a message after the session times out, I get
a callback when the session times out (reachedDead), which is correct.

However, what's not happening reliably is the reachedPolling state.
Most of the time my test client goes reachedDead -> reachedPolling -> reachedAlive.
In some cases it just goes reachedDead and no further.

I did note this exception that popped out on the client side in a case
where the client didn't get to a polling state.  I don't know if it's 
relevant or not though.  I didn't see any other log output or exceptions around
the time this occurred.  The server side simply indicates the session timed out.

2008-04-01 13:45:36,602 INFO  [STDOUT] java.lang.Exception: Stack trace
2008-04-01 13:45:36,603 INFO  [STDOUT]  at java.lang.Thread.dumpStack(Thread.java:1158)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.client.ClientErrorHandler.handleError(ClientErrorHandler.java:79)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchManager.givingUpDelivery(DispatchManager.java:379)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchManager.shutdownFomAnyState(DispatchManager.java:371)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.updateState(DispatchConnectionsHandler.java:368)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.toDead(DispatchConnectionsHandler.java:336)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchConnection.handleTransition(DispatchConnection.java:498)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchConnection.send(DispatchConnection.java:241)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.send(DispatchConnectionsHandler.java:455)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchWorker.run(DispatchWorker.java:70)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchManager.putPre(DispatchManager.java:668)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.dispatch.DispatchManager.putPre(DispatchManager.java:642)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.util.queue.ram.RamQueuePlugin.put(RamQueuePlugin.java:723)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.client.XmlBlasterAccess.queueMessage(XmlBlasterAccess.java:901)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at org.xmlBlaster.client.XmlBlasterAccess.publish(XmlBlasterAccess.java:1061)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at com.navahonetworks.app.jboss.xmlblaster.NNXmlBlasterClientImpl.publish(NNXmlBlasterClientImpl.java:165)
2008-04-01 13:45:36,603 INFO  [STDOUT]  at com.navahonetworks.app.jboss.xmlblaster.NNXmlBlasterClientImpl.publish(NNXmlBlasterClientImpl.java:138)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at java.lang.reflect.Method.invoke(Method.java:585)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at com.navahonetworks.ejb.session.XmlblasterLogicBean.publish(XmlblasterLogicBean.java:287)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at com.navahonetworks.ejb.session.XmlblasterLogicBean.publish(XmlblasterLogicBean.java:372)
2008-04-01 13:45:36,604 INFO  [STDOUT]  at com.navahonetworks.ejb.session.XmlblasterLogicBean$TxSyncThread.run(XmlblasterLogicBean.java:809)
2008-04-01 13:45:36,605 ERROR [STDERR] 1-Apr-2008 1:45:36 PM org.xmlBlaster.util.dispatch.DispatchManager switchToASyncMode
INFO: connection:client/app_prod/12: Switched to asynchronous message delivery

-- 
David Kerry