Details
-
Type:
Other
-
Status: Closed
-
Priority:
Default
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Hi,
I have a FIX initiator that implements the Application interface, and uses the code below to log on to sessions. I connect just fine...however, I've noticed that I keep sending two logon messages instead of just one. Is there something that I am doing incorrectly?
[code]
// Method to determine messages that we send to the FIX Exchange (Administrator class messages)
public void toAdmin(Message message, SessionID sessionId)
{
if(isMessageOfType(message, MsgType.LOGON) && (loginsent == false))
{
loginsent = true;
// Get information from properties
String user = "user";
String password = "password";
UserNameField usefield = new UserNameField(user);
PasswordField passfield = new PasswordField(password);
// Set Message References
Message msgToMod = message;
msgToMod.setField(usefield);
msgToMod.setField(passfield);
// Send Message
try
catch(Exception ex)
{ System.out.println("SESSION NOT FOUND!"); ex.printStackTrace(); } }
}
[/code]
Thanks and regards,
hhung