|
From: Robert B. <rbr...@me...> - 2007-04-30 17:53:18
|
Here's my TestInitiator class:
----
package com.merlin.pb.fix;
import java.io.InputStream;
import quickfix.DefaultMessageFactory;
import quickfix.FileStoreFactory;
import quickfix.Initiator;
import quickfix.LogFactory;
import quickfix.MessageFactory;
import quickfix.MessageStoreFactory;
import quickfix.ScreenLogFactory;
import quickfix.SessionSettings;
import quickfix.ThreadedSocketInitiator;
public class TestInitiator {
private static Initiator initiator =3D null;
public static void main(String args[]) {
try {
System.out.println("running FIX engine...");
=09=20=20=20=20=09
InputStream inputStream =3D
=09
MerlinFIXInitiator.class.getResourceAsStream("initiator.cfg");
=09
SessionSettings settings =3D new
SessionSettings(inputStream);
TestApplication application =3D new TestApplication();
=20=20=20=20=20=20=20=20=20=20=20=20
MessageStoreFactory messageStoreFactory =3D new
FileStoreFactory(settings);
LogFactory logFactory =3D new ScreenLogFactory(true, true,
true, true);
=20=20=20=20=20=20=20=20=20=20=20=20
MessageFactory messageFactory =3D new DefaultMessageFactory();
=20=20=20=20=20=20=20=20=20=20=20=20
System.out.println("beginning initiator...");
initiator =3D new ThreadedSocketInitiator(application,
messageStoreFactory,
settings,
logFactory,
messageFactory);
initiator.start();
} catch(Exception e) {
e.printStackTrace(System.out);
}
}
}
----
Here's my TestApplication class:
----
package com.merlin.pb.fix;
import quickfix.Application;
import quickfix.DoNotSend;
import quickfix.FieldNotFound;
import quickfix.IncorrectDataFormat;
import quickfix.IncorrectTagValue;
import quickfix.Message;
import quickfix.MessageCracker;
import quickfix.RejectLogon;
import quickfix.SessionID;
import quickfix.UnsupportedMessageType;
public class TestApplication extends MessageCracker implements
Application {
public TestApplication() {}
/* (non-Javadoc)
* @see quickfix.Application#fromAdmin(quickfix.Message,
quickfix.SessionID)
*/
public void fromAdmin(Message arg0, SessionID arg1) throws
FieldNotFound,
IncorrectDataFormat, IncorrectTagValue,
RejectLogon {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#fromApp(quickfix.Message,
quickfix.SessionID)
*/
public void fromApp(Message arg0, SessionID arg1) throws
FieldNotFound,
IncorrectDataFormat, IncorrectTagValue,
UnsupportedMessageType {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#onCreate(quickfix.SessionID)
*/
public void onCreate(SessionID arg0) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#onLogon(quickfix.SessionID)
*/
public void onLogon(SessionID arg0) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#onLogout(quickfix.SessionID)
*/
public void onLogout(SessionID arg0) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#toAdmin(quickfix.Message,
quickfix.SessionID)
*/
public void toAdmin(Message arg0, SessionID arg1) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see quickfix.Application#toApp(quickfix.Message,
quickfix.SessionID)
*/
public void toApp(Message arg0, SessionID arg1) throws DoNotSend
{
// TODO Auto-generated method stub
}
}
----
You can clearly see NOTHING is going on...I'm not doing anything with
incoming messages...just testing connectivity pretty much:
Test results:
Using qfj-1.0.3/mina-core-0.9.3/slfj-jdk14-1.0.1:
running FIX engine...
beginning initiator...
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Session
FIX.4.2:MERL_DROP->NEOV schedule is daily, 00:00:00 UTC - 00:00:00 UTC)
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Created session:
FIX.4.2:MERL_DROP->NEOV)
Apr 30, 2007 1:44:59 PM quickfix.mina.initiator.InitiatorIoHandler
sessionCreated
INFO: MINA session created: /10.68.5.33:1550
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, outgoing>
(8=3DFIX.4.2=019=3D69=0135=3DA=0134=3D27=0149=3DMERL_DROP=0152=3D20070430-1=
7:44:59.905=0156=3DNEOV
=0198=3D0=01108=3D30=0110=3D067=01)
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Initiated logon
request)
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, incoming>
(8=3DFIX.4.2=019=3D0065=0135=3DA=0134=3D33=0149=3DNEOV=0156=3DMERL_DROP=015=
2=3D20070430-17:44:59=019
8=3D0=01108=3D30=0110=3D208=01)
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Received logon
response)
<20070430-17:45:29, FIX.4.2:MERL_DROP->NEOV, incoming>
(8=3DFIX.4.2=019=3D0053=0135=3D0=0134=3D34=0149=3DNEOV=0156=3DMERL_DROP=015=
2=3D20070430-17:45:29=011
0=3D162=01)
<20070430-17:45:29, FIX.4.2:MERL_DROP->NEOV, outgoing>
(8=3DFIX.4.2=019=3D57=0135=3D0=0134=3D28=0149=3DMERL_DROP=0152=3D20070430-1=
7:45:29.936=0156=3DNEOV
=0110=3D025=01)
...and so on and so forth...regular continuous and uninterrupted
heartbeats...
Using qfj-1.0.5/mina-core-1.0.0/slf-jdk14-1.0.1 OR using
qfj-1.0.1/mina-core-1.0.1/mina-sources-1.0.1/slf-api-1.3.0/slf-jdk14-1.3
.0:
running FIX engine...
beginning initiator...
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Session
FIX.4.2:MERL_DROP->NEOV schedule is daily, 00:00:00 UTC - 00:00:00 UTC)
<20070430-17:44:59, FIX.4.2:MERL_DROP->NEOV, event> (Created session:
FIX.4.2:MERL_DROP->NEOV)
...engine stops. That's it. No message, nothing.
What the heck could I possibly be doing wrong with the code above...it's
empty shell code...why would it work for 1.0.3 and no version greater?
Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single S=
trategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007
=20
--------------------------------------------------------
This message contains information from Merlin Securities, LLC, or from one =
of its affiliates, that may be confidential and privileged. If you are not =
an intended recipient, please refrain from any disclosure, copying, distrib=
ution or use of this information and note that such actions are prohibited.=
If you have received this transmission in error, please notify the sender =
immediately by telephone or by replying to this transmission.
=20
Merlin Securities, LLC is a registered broker-dealer. Services offered thro=
ugh Merlin Securities, LLC are not insured by the FDIC or any other Federal=
Government Agency, are not deposits of or guaranteed by Merlin Securities,=
LLC and may lose value. Nothing in this communication shall constitute a s=
olicitation or recommendation to buy or sell a particular security.
|