[Quickfix-developers] SessionNotFound Exception sending messages in Java
Brought to you by:
orenmnero
From: David M. <Dav...@mo...> - 2003-03-28 14:47:50
|
Hi all, Coming along in QF. I saw some old threads which experienced this exact problem, ie, QF for Java has some problem finding the right session. Here is the scoop: There are 3 overrides to Session.sendToTarget a) sendToTarget(Message) b) sendToTarget(Message, SessionID) c) sendToTarget(Message, SenderCompID (string), SenderTargetID (string)) It turns out that no matter what I tried with c, I ALWAYS got SessionNotFound!!! I also noticed that if I set the following in the cfg file: SenderCompID=OrderEngine TargetCompID=monheit I got back a sessionID of "FIX.4.0:OrderEngine->monheit" on the C++ program, ie, executor. When I ran my order entry program in Java with a cfg of: SenderCompID=monheit TargetCompID=OrderEngine the sessionID was "FIX.4.0: monheit->OrderEngine" !!! Note the space in there!!!! The way I got it to work is by using override b, and sending the SessionID which I got on the order... I did not try method a yet. Need to have a look at why this is. Regards David |