[Quickfix-developers] Re: session.sendToTarget method and SessionNotFound exception
Brought to you by:
orenmnero
|
From: Oren M. <or...@qu...> - 2005-07-06 16:20:55
|
All implementations of sendToTarget are static (in C++ static methods can look like members due to how they can be invoked), but rest assured both signatures you are using are static. My guess is that your session has a qualifier which you are not supplying. The qualifier is not contained within the message, so if you are not passing in a sessionId, you must specify the qualifier yourself. receivedLogon indicates the session has received a logon message. IsLoggedOn indicates that both receivedLogon and sentLogon are true. Realistically these would be the same value. --oren On Jul 6, 2005, at 10:56 PM, Alvin Wang wrote: > > Hi > > I use Session.lookupSession(sessionId) method to get a Session > object s, and s.isEnabled() && s.isLoggedOn() && s.receivedLogon() > == true. However, when I try to send a message using > s.sendToTarget(msg), I got a SessionNotFound exception. However, if > I use the static method of Session.sendToTarget(msg, sessionId), I > can send out the message. Do I miss anything here? > > BTW, what is the difference between the usages of isLoggedOn() and > receivedLogon() in session object? > > Thanks > Alvin > ********************************************************************** > This e-mail message is intended solely for the use of the > addressee. The message may contain information that is privileged > and confidential. Disclosure to anyone other than the intended > recipient is prohibited. If you are not the intended recipient, > please do not disseminate, distribute or copy this communication, > by e-mail or otherwise. Instead, please notify us immediately by > return e-mail (including the original message with your reply) and > then delete and discard all copies of the message. We have taken > precautions to minimize the risk of transmitting software viruses > but nevertheless advise you to carry out your own virus checks on > any attachment to this message. We accept no liability for any loss > or damage caused by software viruses. > ********************************************************************** |