[Quickfix-developers] QuickFIX/J oddity...
Brought to you by:
orenmnero
|
From: Tom D. <to...@di...> - 2006-01-02 21:22:09
|
A couple of weeks ago (I think it was), I posted about a strange problem I had in my QuickFIX/J application, wherein TCP connections were not being correctly made (they would shut down immediately after the three-way handshake was complete) under certain conditions until I introduced a delay in my Application implementation's onCreate() method. This is on the Initiator side of the FIX conversation. A one-second delay seemed to do the trick, 100% of the time while running in a debugger, and perhaps 95% of the time while not in a debugger. I wrote this off, basically, as an unexplained problem solved by an unexplained hack that worked enough of the time that I could just ignore it for now. Well, today I discovered something else completely by accident; this may provide a clue for someone knowledgeable about QuickFIX/J's internals to track it down. My discovery: if I call <Session>.logout() in the <Application>.onCreate() method, the problem seems to completely disappear, even with my hack one-second delay removed. I have, at this point, started successfully over 100 times without the debugger -- something I've never been able to do before. Quite pleasant, actually <smile>. I only found this because I was implementing the logic to let my application manage the logons and logouts (desirable for many reasons in my particular application), and I just happened to notice that the occasional hang at startup disappeared. I hope someone can gnaw at this clue and come up with an answer... Tom... |