0

I am doing a development to integrate a non Java OMS system with QuickFIX/J to send buy/sell orders to multiple brokerage systems . I have written the belog logic to send the messages

I have written this under main function which is in the same class created by implementing Application "public class Initiator implements Application"

InputStream inp = InitiatorSocket.class.getResourceAsStream("test.cfg");

SessionSettings sessionSetting = new SessionSettings(inp);

Application myApp = new Initiator();

FileStoreFactory factory = new FileStoreFactory(sessionSetting);

ScreenLogFactory sfactory = new ScreenLogFactory(sessionSetting);

DefaultMessageFactory defaultMsgFactory = new DefaultMessageFactory();

initiator = new SocketInitiator(myApp, factory, sessionSetting,sfactory,defaultMsgFactory);

initiator.start();

SessionID sessionId = initiator.getSessions().get(0);

I am using the below code to send messages after continuously listening a directory using while Loop.

while(true)
{
    readFilefromSrcDirectory();

    prepareFixMessage();

    Session.sendToTarget(fixMessage, sessionId);
}

My above code is getting executed while debugging but when I run it normally, the Session.sendToTarget(fixMessage, sessionId); and other file read related logic which is next to initiator.start(); is not getting executed.

Kindly note that the same above code is getting executed if we add some console print statements such as System.out.print("Test");

Please help me.

Rami
  • 7,879
  • 12
  • 36
  • 66

1 Answers1

0

Are your test.cfg settings between debug and run different? I would add console print statements everywhere and work out exactly where the runtime is failing.

rupweb
  • 3,052
  • 1
  • 30
  • 57
  • HI Rupweb, As I mentioned the logic is working fine If we use the console print system.out.println. But the same logic not getting triggered when we remove the console print – SaravanaKumar Subramaniyan Jul 27 '15 at 09:15