|
From: Robert B. <rbr...@me...> - 2007-04-30 19:23:40
|
Yeah...since my last post I rewrote my main initiator class and instead of putting everything in the main method, functioned all of it out and I create an instance of my initiator class in the main method and call .wait() on it after starting up the initiator and that got the actual engine up and running. I'm still only able to use the file store for my message logging though...even with the latest release of qf/j, connecting to Oracle for the jdbc store results in the: JdbcLog cannot log SQLException due to recursive log errors! java.sql.SQLException: We are already in the process of making 1 connections and the number of simultaneous builds has been throttled to 0 at org.logicalcobwebs.proxool.Prototyper.checkSimultaneousBuildThrottle(Pro totyper.java:260)...etc. Thanks again for your help and sorry again for all the emails today! Merlin Securities - #1 Prime Broker North America, #1 Prime Broker Single S= trategy Funds, #1 Prime Broker Funds Under $100M - Global Custodian 2007 From: qui...@li... [mailto:qui...@li...] On Behalf Of Steve Bate Sent: Monday, April 30, 2007 3:18 PM To: qui...@li... Subject: Re: [Quickfixj-users] upgrading engine QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ QuickFIX/J Support: http://www.quickfixj.org/support/ Hi Robert, This means all the JVM threads are "daemon" threads. That's why I was asking if there was a System.exit call or if the main function was exiting. With a SocketAcceptor, the only QFJ-created threads are timer threads and those are created as daemon threads. If the MINA communication threads are also daemon threads, then main() will exit unless you block the main thread (e.g., with Object.wait() or console input) or create a nondaemon thread. It's possible the MINA thread configuration has changed in the last several versions of the library (maybe they weren't daemon threads in earlier versions of the software). Steve > -----Original Message----- > From: qui...@li... > [mailto:qui...@li...]On Behalf Of > Robert Brueckmann > Sent: Monday, April 30, 2007 2:17 PM > To: qui...@li... > Subject: Re: [Quickfixj-users] upgrading engine > > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > I'm sorry for the deluge of emails today, I'm "THAT" guy today...I'm > deeply sorry...but I was doing a little more tinkering and I simply > added: > > System.out.println("press <enter> to quit"); > System.in.read(); > initiator.stop(); > > to my TestInitiator class right after the initiator.start() and now all > library versions work. Why do I have to have a System.in listener in > order for the engine to initialize and function properly in any version > greater than 1.0.3? How can I avoid this? > > Thanks for your patience...I'm sorry > > > > Merlin Securities - #1 Prime Broker North America, #1 Prime > Broker Single Strategy Funds, #1 Prime Broker Funds Under $100M - > Global Custodian 2007 > > > From: qui...@li... > [mailto:qui...@li...] On Behalf Of > Robert Brueckmann > Sent: Monday, April 30, 2007 1:53 PM > To: qui...@li... > Subject: [Quickfixj-users] upgrading engine > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > 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..."); > > InputStream inputStream =3D > > MerlinFIXInitiator.class.getResourceAsStream("initiator.cfg"); > > SessionSettings settings =3D new > SessionSettings(inputStream); > TestApplication application =3D new TestApplication(); > > MessageStoreFactory messageStoreFactory =3D new > FileStoreFactory(settings); > LogFactory logFactory =3D new ScreenLogFactory(true, true, > true, true); > > MessageFactory messageFactory =3D new DefaultMessageFactory(); > > 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 Strategy Funds, #1 Prime Broker Funds Under $100M - Global > Custodian 2007 > > > > > -------------------------------------------------------- > > 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, distribution 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. > > Merlin Securities, LLC is a registered broker-dealer. Services offered > through 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 solicitation or recommendation to buy or sell a particular > security. > > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > > -------------------------------------------------------- > > 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, distribution 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. > > Merlin Securities, LLC is a registered broker-dealer. Services > offered through 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 solicitation or > recommendation to buy or sell a particular security. > > > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Quickfixj-users mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfixj-users =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. |