[QFJ-370] Sending two logon messages when I only mean to send one? Created: 12/Nov/08 Updated: 26/Nov/08 Resolved: 26/Nov/08 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Other | Priority: | Default |
Reporter: | Herman Hung | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
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] // Get information from properties // Set Message References // Send Message catch(Exception ex) { System.out.println("SESSION NOT FOUND!"); ex.printStackTrace(); } } Thanks and regards, |
Comments |
Comment by Herman Hung [ 12/Nov/08 ] |
Also, I am using FIX4.2. The code for the "isMessageOfType" method is: private boolean isMessageOfType(Message message, String type) { catch (FieldNotFound e) { e.printStackTrace(); return false; }} Thanks. |
Comment by Laurent Danesi [ 12/Nov/08 ] |
Hi Herman, Your code seems ok but you don't need to send the message after added the username and password. The callback toAdmin is just an interceptor while sending the message. So just try this: [code] // Get information from properties // Set Message References |
Comment by Herman Hung [ 12/Nov/08 ] |
That worked wonders...thanks for your help! Regards, |
Comment by Laurent Danesi [ 12/Nov/08 ] |
You are welcome. Laurent |
Comment by Herman Hung [ 13/Nov/08 ] |
This issue is resolved and can now be closed. Regards, |