Re: [Quickfix-developers] QuickFix (Java) does not logon?
Brought to you by:
orenmnero
|
From: <gar...@su...> - 2002-12-13 15:17:28
|
As a hint, I know I needed to call the initiator.start() in a separate
Thread. I think the start() does block.
Here's my method to kick off the FIX engine:
protected void initializeFIX() {
Thread fixThread = new Thread ("FIX Initialization thread") {
public void run() {
try {
String fixCfg = QFEProperties.getFixCfg();
LogUtil.log ("Initializing FIX engine based on
configuration: " + fixCfg);
Application application = new Application();
Settings settings = new
Settings(QFEInitiator.class.getClassLoader().
getResourceAsStream
(fixCfg));
MessageStoreFactory messageStoreFactory =
new FileStoreFactory(settings);
LogFactory logFactory = new ScreenLogFactory(true,
true, true);
MessageFactory messageFactory = new
DefaultMessageFactory();
initiator = new SocketInitiator
(application, messageStoreFactory, settings,
logFactory, messageFactory);
initiator.start();
} catch(ConfigError e) {
LogUtil.handleException (LogUtil.SEVERITY_LEVEL_3,
"Exception occurred
initializing FIX engine",
e);
throw new PMFatalException ("Exception occurred
initializing FIX engine: " +
e.getMessage());
}
}
};
fixThread.start();
}
Gary Mui
Prescient Markets, Inc 914-989-3118 (W)
445 Hamilton Avenue 914-422-3693 (F)
White Plains, NY 10601
Please visit us at http://www.cpmarket.com
"Alvin Wang"
<xw...@qt...> To: <OM...@th...>,
Sent by: <qui...@li...>
qui...@li... cc:
eforge.net Subject: [Quickfix-developers] QuickFix (Java) does not logon?
12/13/02 10:06 AM
Hi! Sometimes, when I start a session, quickfix can print out "Create
session", but it does not send out logon message and so cannot logon. I
guess it has something to do with store state, since I can fix this problem
if I delete all the related files in store folder. Also if I use debugger
to
step through, I think initiator.start() statement hangs.
Please advise. thanks!
Alvin
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Quickfix-developers mailing list
Qui...@li...
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
|