quickfix-developers Mailing List for QuickFIX (Page 224)
Brought to you by:
orenmnero
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
|
Feb
(5) |
Mar
(16) |
Apr
(15) |
May
(17) |
Jun
(33) |
Jul
(35) |
Aug
(34) |
Sep
(19) |
Oct
(40) |
Nov
(51) |
Dec
(43) |
2003 |
Jan
(45) |
Feb
(79) |
Mar
(124) |
Apr
(121) |
May
(132) |
Jun
(77) |
Jul
(110) |
Aug
(57) |
Sep
(48) |
Oct
(83) |
Nov
(60) |
Dec
(40) |
2004 |
Jan
(67) |
Feb
(72) |
Mar
(74) |
Apr
(87) |
May
(70) |
Jun
(96) |
Jul
(75) |
Aug
(147) |
Sep
(128) |
Oct
(83) |
Nov
(67) |
Dec
(42) |
2005 |
Jan
(110) |
Feb
(84) |
Mar
(68) |
Apr
(55) |
May
(51) |
Jun
(192) |
Jul
(111) |
Aug
(100) |
Sep
(79) |
Oct
(127) |
Nov
(73) |
Dec
(112) |
2006 |
Jan
(95) |
Feb
(120) |
Mar
(138) |
Apr
(127) |
May
(124) |
Jun
(97) |
Jul
(103) |
Aug
(88) |
Sep
(138) |
Oct
(91) |
Nov
(112) |
Dec
(57) |
2007 |
Jan
(55) |
Feb
(35) |
Mar
(56) |
Apr
(16) |
May
(20) |
Jun
(77) |
Jul
(43) |
Aug
(47) |
Sep
(29) |
Oct
(54) |
Nov
(39) |
Dec
(40) |
2008 |
Jan
(69) |
Feb
(79) |
Mar
(122) |
Apr
(106) |
May
(114) |
Jun
(76) |
Jul
(83) |
Aug
(71) |
Sep
(53) |
Oct
(75) |
Nov
(54) |
Dec
(43) |
2009 |
Jan
(32) |
Feb
(31) |
Mar
(64) |
Apr
(48) |
May
(38) |
Jun
(43) |
Jul
(35) |
Aug
(15) |
Sep
(52) |
Oct
(62) |
Nov
(62) |
Dec
(21) |
2010 |
Jan
(44) |
Feb
(10) |
Mar
(47) |
Apr
(22) |
May
(5) |
Jun
(54) |
Jul
(19) |
Aug
(54) |
Sep
(16) |
Oct
(15) |
Nov
(7) |
Dec
(8) |
2011 |
Jan
(18) |
Feb
(9) |
Mar
(5) |
Apr
(5) |
May
(41) |
Jun
(40) |
Jul
(29) |
Aug
(17) |
Sep
(12) |
Oct
(23) |
Nov
(22) |
Dec
(11) |
2012 |
Jan
(8) |
Feb
(24) |
Mar
(5) |
Apr
(5) |
May
(6) |
Jun
(5) |
Jul
(5) |
Aug
(5) |
Sep
(2) |
Oct
(9) |
Nov
(2) |
Dec
(18) |
2013 |
Jan
(25) |
Feb
(16) |
Mar
(8) |
Apr
(2) |
May
(16) |
Jun
(17) |
Jul
(2) |
Aug
(13) |
Sep
(3) |
Oct
(4) |
Nov
(1) |
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
(22) |
Apr
(9) |
May
(3) |
Jun
(1) |
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(4) |
Nov
(4) |
Dec
(3) |
2015 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
(37) |
Jul
|
Aug
(4) |
Sep
(6) |
Oct
(1) |
Nov
(4) |
Dec
(2) |
2016 |
Jan
(9) |
Feb
(3) |
Mar
(7) |
Apr
(1) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
(3) |
Nov
(16) |
Dec
|
2017 |
Jan
(1) |
Feb
(15) |
Mar
(2) |
Apr
(12) |
May
(4) |
Jun
(7) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(8) |
2018 |
Jan
(2) |
Feb
(4) |
Mar
(2) |
Apr
(8) |
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(5) |
Nov
(3) |
Dec
|
2020 |
Jan
|
Feb
(4) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
(5) |
Sep
(3) |
Oct
(1) |
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: James C. D. <jc...@co...> - 2004-10-13 15:11:09
|
Himanshu, Looking at the logs you posted, I don't see the situation you mentioned in 1) below. Can you point me to the incoming and outgoing logs where this exists (you send two sets of logs)? Jim James C. Downs Connamara Systems, LLC 53 W. Jackson Blvd Suite 1627 Chicago, IL 60604 312 - 282 - 7746 www.connamara.com -----Original Message----- From: Sharma Himanshu [mailto:sha...@ho...] Sent: Monday, October 11, 2004 4:08 PM To: jc...@co...; qui...@li... Subject: RE: [Quickfix-developers] Issues in quickfix v1.8.0 James, I will send the necessary logs. In the meanwhile, I also tested some more of the "robustness" of QF 1.8.0. Another of the problem which I missed out was that after sending lots of data I sometimes a. get unnecessary 35=5 [Logout messages]. Attached are the logs + configuration file. b. Sequence reset message. I guess these would be happening because of pt. a. Regards, Himanshu >From: "James C. Downs" <jc...@co...> >To: "'Sharma Himanshu'" ><sha...@ho...>,<qui...@li... >t> >Subject: RE: [Quickfix-developers] Issues in quickfix v1.8.0 >Date: Mon, 11 Oct 2004 13:13:09 -0500 > >QuickFIX Documentation: >http://www.quickfixengine.org/quickfix/doc/html/index.html >QuickFIX FAQ: >http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ >QuickFIX Support: http://www.quickfixengine.org/services.html > >Himanshu, >Could you expand a little on the scenario described in paragraph 1 >below and possible send fragments of the incoming and outgoing logs >that illustrate this? > > >Jim > >James C. Downs >Connamara Systems, LLC >53 W. Jackson Blvd >Suite 1627 >Chicago, IL 60604 >312 - 282 - 7746 >www.connamara.com > >-----Original Message----- >From: qui...@li... >[mailto:qui...@li...] On Behalf Of >Sharma Himanshu >Sent: Monday, October 11, 2004 11:01 AM >To: qui...@li... >Subject: [Quickfix-developers] Issues in quickfix v1.8.0 > >QuickFIX Documentation: >http://www.quickfixengine.org/quickfix/doc/html/index.html >QuickFIX FAQ: >http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ >QuickFIX Support: http://www.quickfixengine.org/services.html > >Hi, > >I am using QuickFIX v1.8.0 on Solaris. I am running QuickFIX as part of >a test tool where we send get lot of executions in a very short span of time. > >Some of the issues I observed are: > >1. If the counterparty engine send a wrong message. Ex. sends an >execution for NewOrderSingle with tag 39=2 and then follows it up with >39=1, the quickfix library causes itself the session to be >disconnected.[Event log >shows: "Disconnecting"]. The outgoing log shows that FIX library had >actually sent Logon message. No logoff message is seen. > >2. All subsequent send command returns me exception but the cause of >expection is empty. [ex.what() == ""]. Detailed examination also showed >Session::sendRaw() blocks at the m_application.toAdmin() or >m_application.toApp(). > >3. I am also using ACE where, we have redirected std::cerr as STDERR. >Now when I try to do a std::cout from within Application::fromApp(), i >never see the output. Nor does ACE_DEBUG() works. But if I do >std::cerr, it works fine. Also when I am sending message, i can do >std::cout without problem. > >4. In case if the recvQueue has some messages pending, it does not >allow me to disconnect the session [using ThreadedInitiator::stop()]. > >I am using SynchonizedApplication class in the initiator boot. The >Application class sets itself with SynchonizedApplication class. The >Initiator used is ThreadedSocketInitiator(). > >Is there any sense in all this? Has anyone faced such problems before. > >Also how can i know if the physical socket connection is still valid. >Is there any method which allows me to purge messages in recvQueue, >before I try disconnecting the session? > >Thanks in advance, since this is a lengthy message and the situation is >bit confusing even for me! > >Regards, >Himanshu > >_________________________________________________________________ >Movies, music, celeb news. Stay in the loop. >http://www.msn.co.in/cinema/ With MSN Entertainment! > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on >ITManagersJournal Use IT products in your business? Tell us what you >think of them. Give us Your Opinions, Get Free ThinkGeek Gift >Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Quickfix-developers mailing list >Qui...@li... >https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > >------------------------------------------------------- >This SF.net email is sponsored by: IT Product Guide on >ITManagersJournal Use IT products in your business? Tell us what you >think of them. Give us Your Opinions, Get Free ThinkGeek Gift >Certificates! Click to find out more >http://productguide.itmanagersjournal.com/guidepromo.tmpl >_______________________________________________ >Quickfix-developers mailing list >Qui...@li... >https://lists.sourceforge.net/lists/listinfo/quickfix-developers _________________________________________________________________ Still single? Meet the perfect match. http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Join BharatMatrimony.com for FREE |
From: Vijay Y. <vy...@op...> - 2004-10-13 14:46:05
|
Hello all, Upon receipt of a trade, I write the trade to a trade table. For this, I extract fields from ExecutionReport object. I imagine this tells quickfix that I have processed this specific execution report? Is there anyway through which I can extract fields from the ExecutionReport message and still signal Quickfix to reinvoke the ::onMessage with the same execution report. 1. How does QuickFix know within the context of ::onMessage that this message need not be sent again. 2. Is there a way to force QuickFix to resend the same message i.e. reinvoke onMessage till I somehow explicitly signal that I've successfully processed the message. I could store the message locally within my app and process it as and when I deem necessary but I'm trying to see if I can do it the lazy way. -- vijay |
From: Oren M. <or...@qu...> - 2004-10-13 14:27:47
|
Eddy, No, that is currently the only way to do it. It's not specific to Java, the same goes for C++. You can query for the presence of a session with doesSessionExist (may need to get the version in CVS for this). Right now the easiest thing to do is create a member variable like an ArrayList in your application to store the sessions as they come in. onCreate is guaranteed to be called before any anything else. I generally like using two array lists, one that has all the sessions, and one that has logged on sessions where they are added and removed by onLogon and onLogoff respectively. I'll add a feature request for this as there should probably be a way to ask an Initiator or Acceptor for its sessions, as well as a static query of all sessions. --oren On Oct 13, 2004, at 5:40 AM, Van Gelder Eddy (KETO 21) wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi all, > > ist there a way to get to a list of all available sessionIDs from > within JAVA ( without using the onCreate, and then storing them ) ? > > best regards, > > Eddy > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Oren M. <or...@qu...> - 2004-10-13 14:22:15
|
Have you tried using the messages that come from the onEvent callback to the logger? You can derive a class from the logger interface and have those messages displayed to the front end. --oren On Oct 13, 2004, at 3:36 AM, Emil Vladov wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi guys, > > I'm having little problem here - basically I want to create a > meaningful error message when one of the two parties disconnects > abnormaly (mostly because of mismatched sequence numbers). > > Basically I want to show the "MsgSeqNum too low, expecting ..." type > messages to the frontend. > > I tried taking the Text field of the Logout message in App::fromAdmin > and App::toAdmin. When I am disconnecting the other party, it's OK. > But when they logout me - it ain't. I traced it to Session::verify, > the logon state is not valid, so it throws an exception and does not > reach the fromCallback call. > > So I'm wondering is there some 'normal' way to get to those messages? > > Thanks, > Emil > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.com/ > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Van G. E. (K. 21) <edd...@cr...> - 2004-10-13 10:40:59
|
Hi all, ist there a way to get to a list of all available sessionIDs from within JAVA ( without using the onCreate, and then storing them ) ? best regards, Eddy |
From: Emil V. <que...@ho...> - 2004-10-13 08:38:03
|
Hi guys, I'm having little problem here - basically I want to create a meaningful error message when one of the two parties disconnects abnormaly (mostly because of mismatched sequence numbers). Basically I want to show the "MsgSeqNum too low, expecting ..." type messages to the frontend. I tried taking the Text field of the Logout message in App::fromAdmin and App::toAdmin. When I am disconnecting the other party, it's OK. But when they logout me - it ain't. I traced it to Session::verify, the logon state is not valid, so it throws an exception and does not reach the fromCallback call. So I'm wondering is there some 'normal' way to get to those messages? Thanks, Emil _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/ |
From: Steven L. <ste...@2G...> - 2004-10-13 02:09:53
|
Hi all, =20 I am developing a FIX sell side engine using FIX 4.0 and quickfix 1.9.2. When I want to test with the trade client bundled in the quickfix engine, I find that it only has ordering functions (New, cancel ,replace), no option for testing Order Status Request, Don't Know Trade and Trade allocation. Would anyone suggest some free FIX client tools having these functions? =20 Many thanks Steven |
From: Oren M. <or...@qu...> - 2004-10-12 23:41:02
|
The MySQLStore shouldn't interfere with receiving messages. Only=20 messages that are sent out are added to storage. It does need to=20 update the sequence number, so that may have some affect. If you are=20 using MySQL to log messages, that could slow you down when logging the=20= incoming messages. More then likely however it is whatever you implemented in fromApp that=20= is doing most of the processing. If you are using the SocketInitiator,=20= everything is happening in one thread, and that thread needs to pull=20 messages off the socket, parse them, and do all of your applications=20 processing. This can leave the socket neglected for some time. I'm guessing if you are using 50-70% of your CPU normally, then a=20 resend request for any significant period range would likely peg you to=20= 100% meaning you can't process it fast enough so you would eventually=20 fall behind. You should probably benchmark your application to find=20 out where your bottlenecks are. Running some tests with a FileStore=20 should also help you indicate if the MySQLStore is an issue (yes,=20 FileStore is *much* faster). If you are expecting high traffic (like with these resend requests) and=20= have significant processing, the ThreadedSocketInitiator would be a=20 better choice. It will dedicate an entire thread to pulling messages=20 off the socket, decreasing the likely hood that it buffer will=20 overload. All the session management (such as storage) and application=20= logic occur in a different thread. It is for these high=20 traffic/processing scenarios that the ThreadedSocketInitiator was=20 specifically designed. If you wrap your application in a=20 SynchronizedApplication, you shouldn't have to alter any of your code=20 to make it thread safe. BTW, how large are these messages and at what rate are you receiving=20 them? --oren On Oct 12, 2004, at 3:17 PM, Clark Sims wrote: > I am using quickfix on a linux box. The box is a 1.8 gigahrtz pentium.=20= > I am using debian linux, "Woody". > =A0 > SLK "upgraded" their hardware last night. On the new hardware my fix=20= > client crashes everytime I send a resend request. The new SLK boxes=20 > spit out messages too fast for me to read them all. > =A0 > What is a convient fix ? > =A0 > All I can of is hacking into the quickfix code, and looking at the=20 > socket open statements. I could use setsockopt, (or whatever that=20 > fucntion is) to increase the buffer size. > =A0 > In the mean time I told them to switch me back to the old hardware.=20 > Fortunately they kept some of the old boxes, and are using them as=20 > backup servers. > =A0 > I also wondered what about mysql? Is that slowing me down? I am using=20= > mysql to store all messages. I am typically using about 50 - 70% of my=20= > cpu intraday. This is a lot higher than I expected. Or perhaps, I just=20= > need to optimize the mysql database? LOL I haven't found the answer=20 > for that yet. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com |
From: Clark S. <cla...@ya...> - 2004-10-12 20:17:30
|
I am using quickfix on a linux box. The box is a 1.8 gigahrtz pentium. I am using debian linux, "Woody". SLK "upgraded" their hardware last night. On the new hardware my fix client crashes everytime I send a resend request. The new SLK boxes spit out messages too fast for me to read them all. What is a convient fix ? All I can of is hacking into the quickfix code, and looking at the socket open statements. I could use setsockopt, (or whatever that fucntion is) to increase the buffer size. In the mean time I told them to switch me back to the old hardware. Fortunately they kept some of the old boxes, and are using them as backup servers. I also wondered what about mysql? Is that slowing me down? I am using mysql to store all messages. I am typically using about 50 - 70% of my cpu intraday. This is a lot higher than I expected. Or perhaps, I just need to optimize the mysql database? LOL I haven't found the answer for that yet. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: <Rob...@ca...> - 2004-10-11 21:12:36
|
Hello All, I'm a newbie to QuickFIX 1.9.2 and am working with Java to write a simple SocketInitiator program. It works well, but hangs at the end of main. Perhaps there's a thread still running or a socket still open. I'm at a loss to understand why I need to invoke System.exit to get my application to end. To experiment, I changed the SocketInitiator to a SocketAcceptor and modified the configuration file. It then terminated properly. The example program "tradeclient," a C++ SocketInitiator program, terminates properly for me, as does the Java SocketAcceptor "executor." Below is a simplified version of my main Java object and my configuration file. Thanks for any help, Rob Kracik Cargill Investor Services ===Java Application=== package buysidesimulator; import quickfix.*; import java.io.FileInputStream; public class BuySideSimulator { static { System.loadLibrary("quickfix_jni"); } public static void main(String args[]) throws Exception { try { // Parse arguments into an object. CmdLineArgs cmdLineArgs = new CmdLineArgs(args); // Standard QuickFix start-up. Application application = new Application(); SessionSettings settings = new SessionSettings(new FileInputStream(cmdLineArgs.m_configFile)); MessageStoreFactory messageStoreFactory = new FileStoreFactory(settings); LogFactory logFactory = new FileLogFactory(settings); MessageFactory messageFactory = new DefaultMessageFactory(); SocketInitiator initiator = new SocketInitiator (application, messageStoreFactory, settings, logFactory, messageFactory); initiator.start(); // For simplicity, don't do any useful work. // application.run(cmdLineArgs); initiator.stop(); } catch (Exception e) { System.out.println(e); } // I get to this point, but need to invoke System.exit(0) to cause my application to end. // System.exit(0); } } ===Configuration File=== (Same as the configuration file I use for "tradeclient") [DEFAULT] ConnectionType=initiator HeartBtInt=30 FileStorePath=store FileLogPath=logs StartTime=06:00:00 EndTime=06:00:00 UseDataDictionary=N SocketConnectHost=localhost SocketConnectPort=5001 [SESSION] BeginString=FIX.4.2 # VeriFIX default values SenderCompID=YourComputer TargetCompID=MyComputer |
From: James C. D. <jc...@co...> - 2004-10-11 18:13:29
|
Himanshu, Could you expand a little on the scenario described in paragraph 1 below and possible send fragments of the incoming and outgoing logs that illustrate this? Jim James C. Downs Connamara Systems, LLC 53 W. Jackson Blvd Suite 1627 Chicago, IL 60604 312 - 282 - 7746 www.connamara.com -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of Sharma Himanshu Sent: Monday, October 11, 2004 11:01 AM To: qui...@li... Subject: [Quickfix-developers] Issues in quickfix v1.8.0 QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ QuickFIX Support: http://www.quickfixengine.org/services.html Hi, I am using QuickFIX v1.8.0 on Solaris. I am running QuickFIX as part of a test tool where we send get lot of executions in a very short span of time. Some of the issues I observed are: 1. If the counterparty engine send a wrong message. Ex. sends an execution for NewOrderSingle with tag 39=2 and then follows it up with 39=1, the quickfix library causes itself the session to be disconnected.[Event log shows: "Disconnecting"]. The outgoing log shows that FIX library had actually sent Logon message. No logoff message is seen. 2. All subsequent send command returns me exception but the cause of expection is empty. [ex.what() == ""]. Detailed examination also showed Session::sendRaw() blocks at the m_application.toAdmin() or m_application.toApp(). 3. I am also using ACE where, we have redirected std::cerr as STDERR. Now when I try to do a std::cout from within Application::fromApp(), i never see the output. Nor does ACE_DEBUG() works. But if I do std::cerr, it works fine. Also when I am sending message, i can do std::cout without problem. 4. In case if the recvQueue has some messages pending, it does not allow me to disconnect the session [using ThreadedInitiator::stop()]. I am using SynchonizedApplication class in the initiator boot. The Application class sets itself with SynchonizedApplication class. The Initiator used is ThreadedSocketInitiator(). Is there any sense in all this? Has anyone faced such problems before. Also how can i know if the physical socket connection is still valid. Is there any method which allows me to purge messages in recvQueue, before I try disconnecting the session? Thanks in advance, since this is a lengthy message and the situation is bit confusing even for me! Regards, Himanshu _________________________________________________________________ Movies, music, celeb news. Stay in the loop. http://www.msn.co.in/cinema/ With MSN Entertainment! ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |
From: Sharma H. <sha...@ho...> - 2004-10-11 16:02:41
|
Hi, I am using QuickFIX v1.8.0 on Solaris. I am running QuickFIX as part of a test tool where we send get lot of executions in a very short span of time. Some of the issues I observed are: 1. If the counterparty engine send a wrong message. Ex. sends an execution for NewOrderSingle with tag 39=2 and then follows it up with 39=1, the quickfix library causes itself the session to be disconnected.[Event log shows: "Disconnecting"]. The outgoing log shows that FIX library had actually sent Logon message. No logoff message is seen. 2. All subsequent send command returns me exception but the cause of expection is empty. [ex.what() == ""]. Detailed examination also showed Session::sendRaw() blocks at the m_application.toAdmin() or m_application.toApp(). 3. I am also using ACE where, we have redirected std::cerr as STDERR. Now when I try to do a std::cout from within Application::fromApp(), i never see the output. Nor does ACE_DEBUG() works. But if I do std::cerr, it works fine. Also when I am sending message, i can do std::cout without problem. 4. In case if the recvQueue has some messages pending, it does not allow me to disconnect the session [using ThreadedInitiator::stop()]. I am using SynchonizedApplication class in the initiator boot. The Application class sets itself with SynchonizedApplication class. The Initiator used is ThreadedSocketInitiator(). Is there any sense in all this? Has anyone faced such problems before. Also how can i know if the physical socket connection is still valid. Is there any method which allows me to purge messages in recvQueue, before I try disconnecting the session? Thanks in advance, since this is a lengthy message and the situation is bit confusing even for me! Regards, Himanshu _________________________________________________________________ Movies, music, celeb news. Stay in the loop. http://www.msn.co.in/cinema/ With MSN Entertainment! |
From: mike <mi...@an...> - 2004-10-11 05:12:44
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brad, we've used QuickFIX and JBoss but used a simpler model for integration (rather than intergrating QuickFIX as an RA). we wrote a separate FIXClient class: public class FIXClient extends MessageCracker implements Application which cracks incoming FIX messages and interfaces to our application via JMX. we used an MBean to control the loading of the QuickFIX library: ~ System.loadLibrary("quickfix_jni"); NB: this was some time ago - about version 1.4 of QuickFIX. HTH Cheers Mike Brad Harvey wrote: | | Thanks for the replies. Jem, I think you're correct that from a pure | J2EE standpoint it should be a RA. Since a fix engine would require | incoming I think this would require JCA 1.5 (ie, JBoss 4) which we | aren't comfortable deploying yet. If time permits I would like to try | this out though. | | As an managed bean I don't think it needs to be constrained by the J2EE | spec, and we could in theory deploy it outside an appserver (using mx4j, | for example). | | At this stage I'm leaning towards not trying to integrate quickfix in | the same JVM as the appserver - this should provide some protection from | one interfering with the other. | | Cheers, | Brad. | | *From:* Day, Jem BGI SF [mailto:Je...@ba...] | *Sent:* Friday, 8 October 2004 7:12 AM | *To:* Oren Miller; Brad Harvey | *Cc:* qui...@li... | *Subject:* RE: [Quickfix-developers] Using quickfix in jboss | | Take this with a pinch-of-salt.... | | From a pure J2EE standpoint shouldn't QuickFix (or any Fix engine) be | deployed as a Connector/ResourceAdaptor (ie JCA) . I'm not suggesting | that this is easy, or even possible but it's the J2EE server that is | meant to supply Threads, Timers etc. so that it can control the overall | resource utilization. | | Jem. | | -----Original Message----- | *From:* qui...@li... | [mailto:qui...@li...]*On Behalf | Of *Oren Miller | *Sent:* Thursday, October 07, 2004 8:25 AM | *To:* Brad Harvey | *Cc:* qui...@li... | *Subject:* Re: [Quickfix-developers] Using quickfix in jboss | | Brad, | | There were a couple of thread on using QuickFIX with jboss. Maybe | some of these will be helpful to you. At the very least they will | show you some contacts for people who have successfully integrated | QuickFIX with jboss. I'll create a bug report for this and see if we | can duplicate the problem. | | http://sourceforge.net/mailarchive/message.php?msg_id=4160033 | http://sourceforge.net/mailarchive/message.php?msg_id=4164853 | http://sourceforge.net/mailarchive/message.php?msg_id=3668061 | | --oren | | On Oct 6, 2004, at 9:04 PM, Brad Harvey wrote: | | Hi All, | | I am investigating using quickfix in a jmx mbean in jboss and | have run into some troubles. Has anyone had any success running | it in an appserver before? | | At present I am able to run my code as a standard java app (a | junit test in eclipse, to be precise) and it seems to work ok - | it connects to the executor sample application and exchanges | logon/logoff messages. | | However, when I fire it up within jboss I run into some | troubles. The loadLibrary call completes ok, and I am able to | make calls through the jni layer. For example, I can get | configuration exceptions back, and I can get Session created log | messages. Unfortunately, as soon as the Connection succeeded | log is written I get a dialog pop up: | | Microsoft Visual C++ Runtime Library | Runtime Error! | Program c:\j2sdk1.4.2\bin\java.exe | abnormal program termination | | When I hit ok on the dialog jboss ends (but it actually | continues to run until I hit ok). What is especially strange is | that it doesn't do a stack dump (like it does when you get a | Unexpected Signal : EXCEPTION_ACCESS_VIOLATION) - the java | process just dies. | | I am using: | windows xp | quickfix 1.9.2 vc7 binary | jboss 3.2.5 | | I have also tried with the vc6 binary. This just terminates | jboss immediately with an abnormal termination error message. I | also tried with quickfix 1.8 and got the same error. I have | tried as both initiator and acceptor and get the same problem | both ways. | | Here's some sample log messages. The first set were from the | unit test, the second are from the appserver. | | 20041006-22:57:35 : Created session | 20041006-22:57:37 : Connecting to 127.0.0.1 on port 65001 | 20041006-22:57:37 : Connection succeeded | 20041006-22:57:38 : Initiated logon request | 20041006-22:57:38 : Received logon response | 20041006-22:57:38 : Received ResendRequest FROM: 13 TO: 0 | 20041006-22:57:38 : Sent SequenceReset TO: 15 | 20041006-22:58:27 : Initiated logout request | 20041006-22:58:27 : Received logout response | 20041006-22:58:27 : Disconnecting | | 20041006-22:58:55 : Created session | 20041006-22:58:55 : Connecting to 127.0.0.1 on port 65001 | 20041006-22:58:55 : Connection succeeded | (crashes now) | | Any hints on what I might be doing wrong (or why I should avoid | the whole concept) would be appreciated. I've included the code | and settings below. It's pretty close to the samples given in | the documentation, with some extra stuff to make it an mbean | (the interface). | | Thanks, | Brad. | | # default settings for sessions | | [DEFAULT] | | ConnectionType=initiator | ReconnectInterval=60 | SenderCompID=TW | FileStorePath=D:\tmp\fixstore | FileLogPath=D:\tmp\fixstore | | # session definition | | [SESSION] | # inherit ConnectionType, ReconnectInterval and SenderCompID | from default | | BeginString=FIX.4.2 | TargetCompID=ARCA | StartTime=00:00:00 | EndTime=23:59:59 | HeartBtInt=20 | SocketConnectPort=65001 | SocketConnectHost=127.0.0.1 | DataDictionary=D:\downloads\quickfix\spec\FIX42.xml | | | | | /* | * Two files, HelloWorld.java (which implements the MBean) and | HelloWorldMBean.java which defines it. | * I compile these, jar them and stick them in the jboss deploy | directory. | * The quickfix.jar also lives in there, but quickfix_jni.dll is | in the $JBOSS_HOME/bin directory. | * | * The deployment descriptor is fairly simple, just specifies | that HelloWorld.jar and quickfix.jar are on the classpath | * and sets the helloMessage string to the name of the settings | file and sets acceptor to true or false. | * | * The MBean deploys fine, but when I invoke startSessions() and | a connection is established it crashes :( | */ | | /* HelloWorld.java */ | package com.test.mbean; | | import java.io.FileInputStream; | | import quickfix.Acceptor; | import quickfix.Application; | import quickfix.DefaultMessageFactory; | import quickfix.DoNotSend; | import quickfix.FieldNotFound; | import quickfix.FileLogFactory; | import quickfix.FileStoreFactory; | import quickfix.IncorrectDataFormat; | import quickfix.IncorrectTagValue; | import quickfix.Initiator; | import quickfix.LogFactory; | import quickfix.Message; | import quickfix.MessageFactory; | import quickfix.MessageStoreFactory; | import quickfix.RejectLogon; | import quickfix.SessionID; | import quickfix.SessionSettings; | import quickfix.SocketAcceptor; | import quickfix.SocketInitiator; | import quickfix.UnsupportedMessageType; | | public class HelloWorld implements HelloWorldMBean, Application { | | /* should really rename this var, left over from my hello | world mbean.... */ | private String helloMessage = "d:\tmp\session.ini"; | private boolean isAcceptor = true; | private Acceptor acceptor; | private Initiator initiator; | | static { | System.loadLibrary("quickfix_jni"); | } | | /** | * @return Returns the helloMessage. | */ | public String getHelloMessage() { | return helloMessage; | } | /** | * @param helloMessage The helloMessage to set. | */ | public void setHelloMessage(String helloMessage) { | this.helloMessage = helloMessage; | } | | public String startSession() { | try { | SessionSettings settings = new SessionSettings(new | | FileInputStream(helloMessage)); | MessageStoreFactory storeFactory = new | FileStoreFactory(settings); | LogFactory logFactory = new | FileLogFactory(settings); | MessageFactory messageFactory = new | DefaultMessageFactory(); | if (isAcceptor) { | acceptor = new SocketAcceptor | (this, storeFactory, | settings, logFactory, | | messageFactory); | acceptor.start(); | } else { | initiator = new SocketInitiator | (this, storeFactory, | settings, logFactory, | | messageFactory); | initiator.start(); | System.out.println("Initiator started"); | } | return getHelloMessage(); | } catch (Exception e) { | return "ERROR: " + e.getMessage(); | } | } | | public void stopSession() { | if (acceptor != null) { | acceptor.stop(); | } | if (initiator != null) { | initiator.stop(); | } | } | | /** | * @return Returns the acceptor. | */ | public boolean isAcceptor() { | return isAcceptor; | } | /** | * @param acceptor The acceptor to set. | */ | public void setAcceptor(boolean acceptor) { | this.isAcceptor = acceptor; | } | | | | /* auto generated methods for application */ | /* (non-Javadoc) | * @see quickfix.Application#onCreate(quickfix.SessionID) | */ | public void onCreate(SessionID arg0) { | System.out.println("Session created: " + arg0); | } | /* (non-Javadoc) | * @see quickfix.Application#onLogon(quickfix.SessionID) | */ | public void onLogon(SessionID arg0) { | System.out.println("Logon: " + arg0); | | } | /* (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 | | } | /* (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 | | } | | } | | | | /* HelloWorldMBean.java */ | | /* | * The MBean interface declaration defines what | * methods are availble to the mbean server | | */ | package com.test.mbean; | | public interface HelloWorldMBean { | | public void setHelloMessage(String helloMessage); | public String getHelloMessage(); | | public void setAcceptor(boolean acceptor); | public boolean isAcceptor(); | | public String startSession(); | public void stopSession(); | | | | } | | - -- ___________________________________________________________________ Mike Hepburn Phone: +61 (2)9247 3422 Anvil Software Limited Fax: +61 (2)9247 3411 55 Harrington Street E-mail: mi...@an... Sydney NSW 2000 ef...@ho... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBaha11Go8kWxl8sERAn5JAJ9tXz4wFzN/8a5dmZNi0Gk/RGNYGACfcz9z GrNN1+10vjOcq256n+tTJKo= =UG5u -----END PGP SIGNATURE----- |
From: Caleb E. <cal...@gm...> - 2004-10-08 19:13:38
|
On Fri, 8 Oct 2004 11:50:48 +0530, Dinesh Belaguli <din...@in...> wrote: > Problem: The provider uses two fields of FIX4.3, "MinBidSize" and > "MinOfferSize", these fields are not defined for FIX4.2, So how do we go > about it? You should be able to add these fields to the XML data dictionary that you use for this connection (assuming you are using a data dictionary on that connection - if not, you don't need to do *anything*). You will need to add them to the <fields> section and to the appropriate <message>s. > Basically we do not know how to get and set custom fields. Any help?? Read the Fine Manual (some might use a stronger F-word there :) http://quickfixengine.org/quickfix/doc/html/user_defined.html -- Caleb Epstein cal...@gm... |
From: Dinesh B. <Din...@in...> - 2004-10-08 06:20:40
|
Hi We are using quickfix 8.0, we need to support "Quote,(FX Outsight) [35 = =3D S]" message for one of our provider. The provider is using FIX 4.2. Problem: The provider uses two fields of FIX4.3, "MinBidSize" and = "MinOfferSize", these fields are not defined for FIX4.2, So how do we go = about it? Also if we need to add an additional custom field not defined in = FIXProtocol and not support by quickfix also, how are we going to do = that. Basically we do not know how to get and set custom fields. Any help?? thanks Dinesh |
From: Brad H. <Bra...@gb...> - 2004-10-08 01:56:28
|
Thanks for the replies. Jem, I think you're correct that from a pure J2EE standpoint it should be a RA. Since a fix engine would require incoming I think this would require JCA 1.5 (ie, JBoss 4) which we aren't comfortable deploying yet. If time permits I would like to try this out though. =20 As an managed bean I don't think it needs to be constrained by the J2EE spec, and we could in theory deploy it outside an appserver (using mx4j, for example). =20 =20 At this stage I'm leaning towards not trying to integrate quickfix in the same JVM as the appserver - this should provide some protection from one interfering with the other. =20 Cheers, Brad. ________________________________ From: Day, Jem BGI SF [mailto:Je...@ba...]=20 Sent: Friday, 8 October 2004 7:12 AM To: Oren Miller; Brad Harvey Cc: qui...@li... Subject: RE: [Quickfix-developers] Using quickfix in jboss Take this with a pinch-of-salt.... =20 From a pure J2EE standpoint shouldn't QuickFix (or any Fix engine) be deployed as a Connector/ResourceAdaptor (ie JCA) . I'm not suggesting that this is easy, or even possible but it's the J2EE server that is meant to supply Threads, Timers etc. so that it can control the overall resource utilization. =20 Jem. -----Original Message----- From: qui...@li... [mailto:qui...@li...]On Behalf Of Oren Miller Sent: Thursday, October 07, 2004 8:25 AM To: Brad Harvey Cc: qui...@li... Subject: Re: [Quickfix-developers] Using quickfix in jboss =09 =09 Brad,=20 There were a couple of thread on using QuickFIX with jboss. Maybe some of these will be helpful to you. At the very least they will show you some contacts for people who have successfully integrated QuickFIX with jboss. I'll create a bug report for this and see if we can duplicate the problem.=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D4160033=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D4164853=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D3668061=20 --oren=20 On Oct 6, 2004, at 9:04 PM, Brad Harvey wrote:=20 Hi All,=20 I am investigating using quickfix in a jmx mbean in jboss and have run into some troubles. Has anyone had any success running it in an appserver before?=20 At present I am able to run my code as a standard java app (a junit test in eclipse, to be precise) and it seems to work ok - it connects to the executor sample application and exchanges logon/logoff messages.=20 However, when I fire it up within jboss I run into some troubles. The loadLibrary call completes ok, and I am able to make calls through the jni layer. For example, I can get configuration exceptions back, and I can get Session created log messages. Unfortunately, as soon as the Connection succeeded log is written I get a dialog pop up:=20 Microsoft Visual C++ Runtime Library=20 Runtime Error!=20 Program c:\j2sdk1.4.2\bin\java.exe=20 abnormal program termination=20 When I hit ok on the dialog jboss ends (but it actually continues to run until I hit ok). What is especially strange is that it doesn't do a stack dump (like it does when you get a Unexpected Signal : EXCEPTION_ACCESS_VIOLATION) - the java process just dies.=20 I am using:=20 windows xp=20 quickfix 1.9.2 vc7 binary=20 jboss 3.2.5=20 I have also tried with the vc6 binary. This just terminates jboss immediately with an abnormal termination error message. I also tried with quickfix 1.8 and got the same error. I have tried as both initiator and acceptor and get the same problem both ways. =20 Here's some sample log messages. The first set were from the unit test, the second are from the appserver.=20 20041006-22:57:35 : Created session=20 20041006-22:57:37 : Connecting to 127.0.0.1 on port 65001=20 20041006-22:57:37 : Connection succeeded=20 20041006-22:57:38 : Initiated logon request=20 20041006-22:57:38 : Received logon response=20 20041006-22:57:38 : Received ResendRequest FROM: 13 TO: 0=20 20041006-22:57:38 : Sent SequenceReset TO: 15=20 20041006-22:58:27 : Initiated logout request=20 20041006-22:58:27 : Received logout response=20 20041006-22:58:27 : Disconnecting=20 20041006-22:58:55 : Created session=20 20041006-22:58:55 : Connecting to 127.0.0.1 on port 65001=20 20041006-22:58:55 : Connection succeeded=20 (crashes now)=20 Any hints on what I might be doing wrong (or why I should avoid the whole concept) would be appreciated. I've included the code and settings below. It's pretty close to the samples given in the documentation, with some extra stuff to make it an mbean (the interface).=20 Thanks,=20 Brad.=20 # default settings for sessions=20 [DEFAULT]=20 ConnectionType=3Dinitiator=20 ReconnectInterval=3D60=20 SenderCompID=3DTW=20 FileStorePath=3DD:\tmp\fixstore=20 FileLogPath=3DD:\tmp\fixstore=20 # session definition=20 [SESSION]=20 # inherit ConnectionType, ReconnectInterval and SenderCompID from default=20 BeginString=3DFIX.4.2=20 TargetCompID=3DARCA=20 StartTime=3D00:00:00=20 EndTime=3D23:59:59=20 HeartBtInt=3D20=20 SocketConnectPort=3D65001=20 SocketConnectHost=3D127.0.0.1=20 DataDictionary=3DD:\downloads\quickfix\spec\FIX42.xml=20 /*=20 * Two files, HelloWorld.java (which implements the MBean) and HelloWorldMBean.java which defines it.=20 * I compile these, jar them and stick them in the jboss deploy directory.=20 * The quickfix.jar also lives in there, but quickfix_jni.dll is in the $JBOSS_HOME/bin directory.=20 *=20 * The deployment descriptor is fairly simple, just specifies that HelloWorld.jar and quickfix.jar are on the classpath=20 * and sets the helloMessage string to the name of the settings file and sets acceptor to true or false.=20 *=20 * The MBean deploys fine, but when I invoke startSessions() and a connection is established it crashes :(=20 */=20 /* HelloWorld.java */=20 package com.test.mbean;=20 import java.io.FileInputStream;=20 import quickfix.Acceptor;=20 import quickfix.Application;=20 import quickfix.DefaultMessageFactory;=20 import quickfix.DoNotSend;=20 import quickfix.FieldNotFound;=20 import quickfix.FileLogFactory;=20 import quickfix.FileStoreFactory;=20 import quickfix.IncorrectDataFormat;=20 import quickfix.IncorrectTagValue;=20 import quickfix.Initiator;=20 import quickfix.LogFactory;=20 import quickfix.Message;=20 import quickfix.MessageFactory;=20 import quickfix.MessageStoreFactory;=20 import quickfix.RejectLogon;=20 import quickfix.SessionID;=20 import quickfix.SessionSettings;=20 import quickfix.SocketAcceptor;=20 import quickfix.SocketInitiator;=20 import quickfix.UnsupportedMessageType;=20 public class HelloWorld implements HelloWorldMBean, Application {=20 =20 /* should really rename this var, left over from my hello world mbean.... */=20 private String helloMessage =3D "d:\tmp\session.ini"; private boolean isAcceptor =3D true;=20 private Acceptor acceptor;=20 private Initiator initiator;=20 static {=20 System.loadLibrary("quickfix_jni");=20 }=20 /**=20 * @return Returns the helloMessage.=20 */=20 public String getHelloMessage() {=20 return helloMessage;=20 }=20 /**=20 * @param helloMessage The helloMessage to set.=20 */=20 public void setHelloMessage(String helloMessage) {=20 this.helloMessage =3D helloMessage;=20 }=20 public String startSession() {=20 try {=20 SessionSettings settings =3D new SessionSettings(new =20 FileInputStream(helloMessage));=20 MessageStoreFactory storeFactory =3D new FileStoreFactory(settings);=20 LogFactory logFactory =3D new FileLogFactory(settings);=20 MessageFactory messageFactory =3D new DefaultMessageFactory();=20 if (isAcceptor) {=20 acceptor =3D new SocketAcceptor=20 (this, storeFactory, settings, logFactory, =20 messageFactory);=20 acceptor.start();=20 } else {=20 initiator =3D new SocketInitiator=20 (this, storeFactory, settings, logFactory, =20 messageFactory);=20 initiator.start();=20 System.out.println("Initiator started");=20 }=20 return getHelloMessage();=20 } catch (Exception e) {=20 return "ERROR: " + e.getMessage();=20 }=20 }=20 public void stopSession() {=20 if (acceptor !=3D null) {=20 acceptor.stop();=20 }=20 if (initiator !=3D null) {=20 initiator.stop();=20 }=20 }=20 /**=20 * @return Returns the acceptor.=20 */=20 public boolean isAcceptor() {=20 return isAcceptor;=20 }=20 /**=20 * @param acceptor The acceptor to set.=20 */=20 public void setAcceptor(boolean acceptor) {=20 this.isAcceptor =3D acceptor;=20 }=20 /* auto generated methods for application */=20 /* (non-Javadoc)=20 * @see quickfix.Application#onCreate(quickfix.SessionID)=20 */=20 public void onCreate(SessionID arg0) {=20 System.out.println("Session created: " + arg0); }=20 /* (non-Javadoc)=20 * @see quickfix.Application#onLogon(quickfix.SessionID)=20 */=20 public void onLogon(SessionID arg0) {=20 System.out.println("Logon: " + arg0);=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#onLogout(quickfix.SessionID)=20 */=20 public void onLogout(SessionID arg0) {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#toAdmin(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void toAdmin(Message arg0, SessionID arg1) { // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#toApp(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void toApp(Message arg0, SessionID arg1) throws DoNotSend {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#fromAdmin(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void fromAdmin(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#fromApp(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void fromApp(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, =20 UnsupportedMessageType {=20 // TODO Auto-generated method stub=20 }=20 }=20 /* HelloWorldMBean.java */=20 /*=20 * The MBean interface declaration defines what=20 * methods are availble to the mbean server=20 */=20 package com.test.mbean;=20 public interface HelloWorldMBean {=20 public void setHelloMessage(String helloMessage);=20 public String getHelloMessage();=20 public void setAcceptor(boolean acceptor);=20 public boolean isAcceptor();=20 public String startSession();=20 public void stopSession();=20 }=20 |
From: Day, J. B. S. <Je...@ba...> - 2004-10-07 21:12:26
|
Take this with a pinch-of-salt.... =20 From a pure J2EE standpoint shouldn't QuickFix (or any Fix engine) be = deployed as a Connector/ResourceAdaptor (ie JCA) . I'm not suggesting = that this is easy, or even possible but it's the J2EE server that is = meant to supply Threads, Timers etc. so that it can control the overall = resource utilization. =20 Jem. -----Original Message----- From: qui...@li... = [mailto:qui...@li...]On Behalf Of = Oren Miller Sent: Thursday, October 07, 2004 8:25 AM To: Brad Harvey Cc: qui...@li... Subject: Re: [Quickfix-developers] Using quickfix in jboss Brad,=20 There were a couple of thread on using QuickFIX with jboss. Maybe some = of these will be helpful to you. At the very least they will show you = some contacts for people who have successfully integrated QuickFIX with = jboss. I'll create a bug report for this and see if we can duplicate the = problem.=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D4160033=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D4164853=20 http://sourceforge.net/mailarchive/message.php?msg_id=3D3668061=20 --oren=20 On Oct 6, 2004, at 9:04 PM, Brad Harvey wrote:=20 Hi All,=20 I am investigating using quickfix in a jmx mbean in jboss and have run = into some troubles. Has anyone had any success running it in an = appserver before?=20 At present I am able to run my code as a standard java app (a junit test = in eclipse, to be precise) and it seems to work ok - it connects to the = executor sample application and exchanges logon/logoff messages.=20 However, when I fire it up within jboss I run into some troubles. The = loadLibrary call completes ok, and I am able to make calls through the = jni layer. For example, I can get configuration exceptions back, and I = can get Session created log messages. Unfortunately, as soon as the = Connection succeeded log is written I get a dialog pop up:=20 Microsoft Visual C++ Runtime Library=20 Runtime Error!=20 Program c:\j2sdk1.4.2\bin\java.exe=20 abnormal program termination=20 When I hit ok on the dialog jboss ends (but it actually continues to run = until I hit ok). What is especially strange is that it doesn't do a = stack dump (like it does when you get a Unexpected Signal : = EXCEPTION_ACCESS_VIOLATION) - the java process just dies.=20 I am using:=20 windows xp=20 quickfix 1.9.2 vc7 binary=20 jboss 3.2.5=20 I have also tried with the vc6 binary. This just terminates jboss = immediately with an abnormal termination error message. I also tried = with quickfix 1.8 and got the same error. I have tried as both = initiator and acceptor and get the same problem both ways. =20 Here's some sample log messages. The first set were from the unit test, = the second are from the appserver.=20 20041006-22:57:35 : Created session=20 20041006-22:57:37 : Connecting to 127.0.0.1 on port 65001=20 20041006-22:57:37 : Connection succeeded=20 20041006-22:57:38 : Initiated logon request=20 20041006-22:57:38 : Received logon response=20 20041006-22:57:38 : Received ResendRequest FROM: 13 TO: 0=20 20041006-22:57:38 : Sent SequenceReset TO: 15=20 20041006-22:58:27 : Initiated logout request=20 20041006-22:58:27 : Received logout response=20 20041006-22:58:27 : Disconnecting=20 20041006-22:58:55 : Created session=20 20041006-22:58:55 : Connecting to 127.0.0.1 on port 65001=20 20041006-22:58:55 : Connection succeeded=20 (crashes now)=20 Any hints on what I might be doing wrong (or why I should avoid the = whole concept) would be appreciated. I've included the code and = settings below. It's pretty close to the samples given in the = documentation, with some extra stuff to make it an mbean (the = interface).=20 Thanks,=20 Brad.=20 # default settings for sessions=20 [DEFAULT]=20 ConnectionType=3Dinitiator=20 ReconnectInterval=3D60=20 SenderCompID=3DTW=20 FileStorePath=3DD:\tmp\fixstore=20 FileLogPath=3DD:\tmp\fixstore=20 # session definition=20 [SESSION]=20 # inherit ConnectionType, ReconnectInterval and SenderCompID from = default=20 BeginString=3DFIX.4.2=20 TargetCompID=3DARCA=20 StartTime=3D00:00:00=20 EndTime=3D23:59:59=20 HeartBtInt=3D20=20 SocketConnectPort=3D65001=20 SocketConnectHost=3D127.0.0.1=20 DataDictionary=3DD:\downloads\quickfix\spec\FIX42.xml=20 /*=20 * Two files, HelloWorld.java (which implements the MBean) and = HelloWorldMBean.java which defines it.=20 * I compile these, jar them and stick them in the jboss deploy = directory.=20 * The quickfix.jar also lives in there, but quickfix_jni.dll is in the = $JBOSS_HOME/bin directory.=20 *=20 * The deployment descriptor is fairly simple, just specifies that = HelloWorld.jar and quickfix.jar are on the classpath=20 * and sets the helloMessage string to the name of the settings file and = sets acceptor to true or false.=20 *=20 * The MBean deploys fine, but when I invoke startSessions() and a = connection is established it crashes :(=20 */=20 /* HelloWorld.java */=20 package com.test.mbean;=20 import java.io.FileInputStream;=20 import quickfix.Acceptor;=20 import quickfix.Application;=20 import quickfix.DefaultMessageFactory;=20 import quickfix.DoNotSend;=20 import quickfix.FieldNotFound;=20 import quickfix.FileLogFactory;=20 import quickfix.FileStoreFactory;=20 import quickfix.IncorrectDataFormat;=20 import quickfix.IncorrectTagValue;=20 import quickfix.Initiator;=20 import quickfix.LogFactory;=20 import quickfix.Message;=20 import quickfix.MessageFactory;=20 import quickfix.MessageStoreFactory;=20 import quickfix.RejectLogon;=20 import quickfix.SessionID;=20 import quickfix.SessionSettings;=20 import quickfix.SocketAcceptor;=20 import quickfix.SocketInitiator;=20 import quickfix.UnsupportedMessageType;=20 public class HelloWorld implements HelloWorldMBean, Application {=20 =20 /* should really rename this var, left over from my hello world = mbean.... */=20 private String helloMessage =3D "d:\tmp\session.ini";=20 private boolean isAcceptor =3D true;=20 private Acceptor acceptor;=20 private Initiator initiator;=20 static {=20 System.loadLibrary("quickfix_jni");=20 }=20 /**=20 * @return Returns the helloMessage.=20 */=20 public String getHelloMessage() {=20 return helloMessage;=20 }=20 /**=20 * @param helloMessage The helloMessage to set.=20 */=20 public void setHelloMessage(String helloMessage) {=20 this.helloMessage =3D helloMessage;=20 }=20 public String startSession() {=20 try {=20 SessionSettings settings =3D new SessionSettings(new =20 FileInputStream(helloMessage));=20 MessageStoreFactory storeFactory =3D new = FileStoreFactory(settings);=20 LogFactory logFactory =3D new FileLogFactory(settings);=20 MessageFactory messageFactory =3D new = DefaultMessageFactory();=20 if (isAcceptor) {=20 acceptor =3D new SocketAcceptor=20 (this, storeFactory, settings, = logFactory, =20 messageFactory);=20 acceptor.start();=20 } else {=20 initiator =3D new SocketInitiator=20 (this, storeFactory, settings, = logFactory, =20 messageFactory);=20 initiator.start();=20 System.out.println("Initiator started");=20 }=20 return getHelloMessage();=20 } catch (Exception e) {=20 return "ERROR: " + e.getMessage();=20 }=20 }=20 public void stopSession() {=20 if (acceptor !=3D null) {=20 acceptor.stop();=20 }=20 if (initiator !=3D null) {=20 initiator.stop();=20 }=20 }=20 /**=20 * @return Returns the acceptor.=20 */=20 public boolean isAcceptor() {=20 return isAcceptor;=20 }=20 /**=20 * @param acceptor The acceptor to set.=20 */=20 public void setAcceptor(boolean acceptor) {=20 this.isAcceptor =3D acceptor;=20 }=20 /* auto generated methods for application */=20 /* (non-Javadoc)=20 * @see quickfix.Application#onCreate(quickfix.SessionID)=20 */=20 public void onCreate(SessionID arg0) {=20 System.out.println("Session created: " + arg0);=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#onLogon(quickfix.SessionID)=20 */=20 public void onLogon(SessionID arg0) {=20 System.out.println("Logon: " + arg0);=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#onLogout(quickfix.SessionID)=20 */=20 public void onLogout(SessionID arg0) {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#toAdmin(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void toAdmin(Message arg0, SessionID arg1) {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#toApp(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void toApp(Message arg0, SessionID arg1) throws DoNotSend {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#fromAdmin(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void fromAdmin(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon {=20 // TODO Auto-generated method stub=20 }=20 /* (non-Javadoc)=20 * @see quickfix.Application#fromApp(quickfix.Message, =20 quickfix.SessionID)=20 */=20 public void fromApp(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, =20 UnsupportedMessageType {=20 // TODO Auto-generated method stub=20 }=20 }=20 /* HelloWorldMBean.java */=20 /*=20 * The MBean interface declaration defines what=20 * methods are availble to the mbean server=20 */=20 package com.test.mbean;=20 public interface HelloWorldMBean {=20 public void setHelloMessage(String helloMessage);=20 public String getHelloMessage();=20 public void setAcceptor(boolean acceptor);=20 public boolean isAcceptor();=20 public String startSession();=20 public void stopSession();=20 }=20 |
From: Oren M. <or...@qu...> - 2004-10-07 20:21:17
|
We have corrected this bug and added acceptance tests which are now passing for both the SocketAcceptor and ThreadedSocketAcceptor. --oren On Oct 5, 2004, at 10:30 AM, Jon Dahl wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Yes, I'm using SocketAcceptor, not ThreadedSocketAcceptor. > > -jd- > >> Are you using the SocketAcceptor? Looking at it it looks to me like >> the ThreadedSocketAcceptor is handling this situation correctly by >> registering Session usage, but SocketAcceptor doesn't appear to be >> doing so. >> >> --oren >> >> On Oct 5, 2004, at 9:41 AM, Jon Dahl wrote: >> >>> QuickFIX Documentation: >>> http://www.quickfixengine.org/quickfix/doc/html/index.html >>> QuickFIX FAQ: >>> http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ >>> QuickFIX Support: http://www.quickfixengine.org/services.html >>> >>> It seems that if a client connects to an Acceptor app with a >>> SenderCompID >>> already connected, it causes the MsgSeqNum to change to the new >>> connection >>> instead of just dropping the connection. >>> >>> Subsequently, the valid client can't enter valid messages until >>> either >>> it >>> disconnects or the server is restarted. We reset our sequence numbers >>> after disconnect and logoff. Those who don't, may run into a bigger >>> problem. >>> >>> Anyone else run into this? >>> >>> QF 1.9.0 >>> RHAS 2.1 >>> gcc 3.04 >>> -------- >>> config: >>> ..... >>> ResetOnDisconnect=Y >>> ResetOnLogout=Y >>> >>> -jd- >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.net email is sponsored by: IT Product Guide on >>> ITManagersJournal >>> Use IT products in your business? Tell us what you think of them. >>> Give >>> us >>> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find >>> out >>> more >>> http://productguide.itmanagersjournal.com/guidepromo.tmpl >>> _______________________________________________ >>> Quickfix-developers mailing list >>> Qui...@li... >>> https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > -- > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Oren M. <or...@qu...> - 2004-10-07 15:25:59
|
Brad, There were a couple of thread on using QuickFIX with jboss. Maybe some=20= of these will be helpful to you. At the very least they will show you=20= some contacts for people who have successfully integrated QuickFIX with=20= jboss. I'll create a bug report for this and see if we can duplicate=20 the problem. http://sourceforge.net/mailarchive/message.php?msg_id=3D4160033 http://sourceforge.net/mailarchive/message.php?msg_id=3D4164853 http://sourceforge.net/mailarchive/message.php?msg_id=3D3668061 --oren On Oct 6, 2004, at 9:04 PM, Brad Harvey wrote: > Hi All, > > I am investigating using quickfix in a jmx mbean in jboss and have run=20= > into some troubles.=A0 Has anyone had any success running it in an=20 > appserver before? > > At present I am able to run my code as a standard java app (a junit=20 > test in eclipse, to be precise) and it seems to work ok - it connects=20= > to the executor sample application and exchanges logon/logoff=20 > messages. > > However, when I fire it up within jboss I run into some troubles.=A0 = The=20 > loadLibrary call completes ok, and I am able to make calls through the=20= > jni layer.=A0 For example, I can get configuration exceptions back, = and=20 > I can get Session created log messages.=A0 Unfortunately, as soon as = the=20 > Connection succeeded log is written I get a dialog pop up: > > Microsoft Visual C++ Runtime Library > Runtime Error! > Program c:\j2sdk1.4.2\bin\java.exe > abnormal program termination > > When I hit ok on the dialog jboss ends (but it actually continues to=20= > run until I hit ok).=A0 What is especially strange is that it doesn't = do=20 > a stack dump (like it does when you get a Unexpected Signal :=20 > EXCEPTION_ACCESS_VIOLATION) - the java process just dies. > > I am using: > windows xp > quickfix 1.9.2 vc7 binary > jboss 3.2.5 > > I have also tried with the vc6 binary.=A0 This just terminates jboss=20= > immediately with an abnormal termination error message.=A0 I also = tried=20 > with quickfix 1.8 and got the same error.=A0 I have tried as both=20 > initiator and acceptor and get the same problem both ways.=A0 > > Here's some sample log messages.=A0 The first set were from the unit=20= > test, the second are from the appserver. > > 20041006-22:57:35 : Created session > 20041006-22:57:37 : Connecting to 127.0.0.1 on port 65001 > 20041006-22:57:37 : Connection succeeded > 20041006-22:57:38 : Initiated logon request > 20041006-22:57:38 : Received logon response > 20041006-22:57:38 : Received ResendRequest FROM: 13 TO: 0 > 20041006-22:57:38 : Sent SequenceReset TO: 15 > 20041006-22:58:27 : Initiated logout request > 20041006-22:58:27 : Received logout response > 20041006-22:58:27 : Disconnecting > > 20041006-22:58:55 : Created session > 20041006-22:58:55 : Connecting to 127.0.0.1 on port 65001 > 20041006-22:58:55 : Connection succeeded > (crashes now) > > Any hints on what I might be doing wrong (or why I should avoid the=20 > whole concept) would be appreciated.=A0 I've included the code and=20 > settings below.=A0 It's pretty close to the samples given in the=20 > documentation, with some extra stuff to make it an mbean (the=20 > interface). > > Thanks, > Brad. > > # default settings for sessions > [DEFAULT] > ConnectionType=3Dinitiator > ReconnectInterval=3D60 > SenderCompID=3DTW > FileStorePath=3DD:\tmp\fixstore > FileLogPath=3DD:\tmp\fixstore > > # session definition > [SESSION] > # inherit ConnectionType, ReconnectInterval and SenderCompID from=20 > default > BeginString=3DFIX.4.2 > TargetCompID=3DARCA > StartTime=3D00:00:00 > EndTime=3D23:59:59 > HeartBtInt=3D20 > SocketConnectPort=3D65001 > SocketConnectHost=3D127.0.0.1 > DataDictionary=3DD:\downloads\quickfix\spec\FIX42.xml > > > > > /* > =A0* Two files, HelloWorld.java (which implements the MBean) and=20 > HelloWorldMBean.java which defines it. > =A0* I compile these, jar them and stick them in the jboss deploy=20 > directory. > =A0* The quickfix.jar also lives in there, but quickfix_jni.dll is in=20= > the $JBOSS_HOME/bin directory. > =A0* > =A0* The deployment descriptor is fairly simple, just specifies that=20= > HelloWorld.jar and quickfix.jar are on the classpath > =A0* and sets the helloMessage string to the name of the settings = file=20 > and sets acceptor to true or false. > =A0* > =A0* The MBean deploys fine, but when I invoke startSessions() and a=20= > connection is established it crashes :( > =A0*/ > > /* HelloWorld.java */ > package com.test.mbean; > > import java.io.FileInputStream; > > import quickfix.Acceptor; > import quickfix.Application; > import quickfix.DefaultMessageFactory; > import quickfix.DoNotSend; > import quickfix.FieldNotFound; > import quickfix.FileLogFactory; > import quickfix.FileStoreFactory; > import quickfix.IncorrectDataFormat; > import quickfix.IncorrectTagValue; > import quickfix.Initiator; > import quickfix.LogFactory; > import quickfix.Message; > import quickfix.MessageFactory; > import quickfix.MessageStoreFactory; > import quickfix.RejectLogon; > import quickfix.SessionID; > import quickfix.SessionSettings; > import quickfix.SocketAcceptor; > import quickfix.SocketInitiator; > import quickfix.UnsupportedMessageType; > > public class HelloWorld implements HelloWorldMBean, Application { > =A0=A0=A0=A0 > =A0=A0=A0=A0 /* should really rename this var, left over from my hello = world=20 > mbean.... */ > =A0=A0=A0=A0 private String helloMessage =3D "d:\tmp\session.ini"; > =A0=A0=A0=A0 private boolean isAcceptor =3D true; > =A0=A0=A0=A0 private Acceptor acceptor; > =A0=A0=A0=A0 private Initiator initiator; > > =A0=A0=A0=A0 static { > =A0=A0=A0=A0=A0=A0=A0=A0 System.loadLibrary("quickfix_jni"); > =A0=A0=A0=A0 } > > =A0=A0=A0=A0 /** > =A0=A0=A0=A0=A0 * @return Returns the helloMessage. > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public String getHelloMessage() { > =A0=A0=A0=A0=A0=A0=A0=A0 return helloMessage; > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /** > =A0=A0=A0=A0=A0 * @param helloMessage The helloMessage to set. > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void setHelloMessage(String helloMessage) { > =A0=A0=A0=A0=A0=A0=A0=A0 this.helloMessage =3D helloMessage; > =A0=A0=A0=A0 } > > =A0=A0=A0=A0 public String startSession() { > =A0=A0=A0=A0=A0=A0=A0=A0 try { > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 SessionSettings settings = =3D new SessionSettings(new=A0 > FileInputStream(helloMessage)); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 MessageStoreFactory = storeFactory =3D new=20 > FileStoreFactory(settings); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 LogFactory logFactory =3D = new FileLogFactory(settings); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 MessageFactory = messageFactory =3D new=20 > DefaultMessageFactory(); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 if (isAcceptor) { > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = acceptor =3D new SocketAcceptor > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0 (this, storeFactory,=20= > settings, logFactory,=A0 > messageFactory); > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acceptor.start(); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 } else { > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 = initiator =3D new SocketInitiator > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0 = =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0 (this, storeFactory,=20= > settings, logFactory,=A0 > messageFactory); > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 initiator.start(); > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = System.out.println("Initiator started"); > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 return getHelloMessage(); > =A0=A0=A0=A0=A0=A0=A0=A0 } catch (Exception e) { > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return "ERROR: " + = e.getMessage(); > =A0=A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0 } > > =A0=A0=A0=A0 public void stopSession() { > =A0=A0=A0=A0=A0=A0=A0=A0 if (acceptor !=3D null) { > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 acceptor.stop(); > =A0=A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0=A0=A0=A0=A0 if (initiator !=3D null) { > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 initiator.stop(); > =A0=A0=A0=A0=A0=A0=A0=A0 } > =A0=A0=A0=A0 } > > =A0=A0=A0=A0 /** > =A0=A0=A0=A0=A0 * @return Returns the acceptor. > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public boolean isAcceptor() { > =A0=A0=A0=A0=A0=A0=A0=A0 return isAcceptor; > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /** > =A0=A0=A0=A0=A0 * @param acceptor The acceptor to set. > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void setAcceptor(boolean acceptor) { > =A0=A0=A0=A0=A0=A0=A0=A0 this.isAcceptor =3D acceptor; > =A0=A0=A0=A0 } > > > > =A0=A0=A0=A0 /* auto generated methods for application */ > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#onCreate(quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void onCreate(SessionID arg0) { > =A0=A0=A0=A0=A0=A0=A0=A0 System.out.println("Session created: " + = arg0); > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#onLogon(quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void onLogon(SessionID arg0) { > =A0=A0=A0=A0=A0=A0=A0=A0 System.out.println("Logon: " + arg0); > > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#onLogout(quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void onLogout(SessionID arg0) { > =A0=A0=A0=A0=A0=A0=A0=A0 // TODO Auto-generated method stub > > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#toAdmin(quickfix.Message,=A0 > quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void toAdmin(Message arg0, SessionID arg1) { > =A0=A0=A0=A0=A0=A0=A0=A0 // TODO Auto-generated method stub > > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see quickfix.Application#toApp(quickfix.Message,=A0 > quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void toApp(Message arg0, SessionID arg1) throws = DoNotSend=20 > { > =A0=A0=A0=A0=A0=A0=A0=A0 // TODO Auto-generated method stub > > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#fromAdmin(quickfix.Message,=A0 > quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void fromAdmin(Message arg0, SessionID arg1) = throws=A0 > FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon { > =A0=A0=A0=A0=A0=A0=A0=A0 // TODO Auto-generated method stub > > =A0=A0=A0=A0 } > =A0=A0=A0=A0 /* (non-Javadoc) > =A0=A0=A0=A0=A0 * @see = quickfix.Application#fromApp(quickfix.Message,=A0 > quickfix.SessionID) > =A0=A0=A0=A0=A0 */ > =A0=A0=A0=A0 public void fromApp(Message arg0, SessionID arg1) = throws=A0 > FieldNotFound, IncorrectDataFormat, IncorrectTagValue,=A0 > UnsupportedMessageType { > =A0=A0=A0=A0=A0=A0=A0=A0 // TODO Auto-generated method stub > > =A0=A0=A0=A0 } > } > > > > /* HelloWorldMBean.java */ > /* > =A0* The MBean interface declaration defines what > =A0* methods are availble to the mbean server > =A0*/ > package com.test.mbean; > > public interface HelloWorldMBean { > > =A0=A0=A0=A0 public void setHelloMessage(String helloMessage); > =A0=A0=A0=A0 public String getHelloMessage(); > > =A0=A0=A0=A0 public void setAcceptor(boolean acceptor); > =A0=A0=A0=A0 public boolean isAcceptor(); > > =A0=A0=A0=A0 public String startSession(); > =A0=A0=A0=A0 public void stopSession(); > > > > } > > > =20= |
From: Brad H. <Bra...@gb...> - 2004-10-07 02:16:26
|
Hi All, I am investigating using quickfix in a jmx mbean in jboss and have run into some troubles. Has anyone had any success running it in an appserver before? At present I am able to run my code as a standard java app (a junit test in eclipse, to be precise) and it seems to work ok - it connects to the executor sample application and exchanges logon/logoff messages. However, when I fire it up within jboss I run into some troubles. The loadLibrary call completes ok, and I am able to make calls through the jni layer. For example, I can get configuration exceptions back, and I can get Session created log messages. Unfortunately, as soon as the Connection succeeded log is written I get a dialog pop up: Microsoft Visual C++ Runtime Library Runtime Error! Program c:\j2sdk1.4.2\bin\java.exe abnormal program termination When I hit ok on the dialog jboss ends (but it actually continues to run until I hit ok). What is especially strange is that it doesn't do a stack dump (like it does when you get a Unexpected Signal : EXCEPTION_ACCESS_VIOLATION) - the java process just dies. I am using: windows xp quickfix 1.9.2 vc7 binary jboss 3.2.5 I have also tried with the vc6 binary. This just terminates jboss immediately with an abnormal termination error message. I also tried with quickfix 1.8 and got the same error. I have tried as both initiator and acceptor and get the same problem both ways. =20 Here's some sample log messages. The first set were from the unit test, the second are from the appserver. 20041006-22:57:35 : Created session 20041006-22:57:37 : Connecting to 127.0.0.1 on port 65001 20041006-22:57:37 : Connection succeeded 20041006-22:57:38 : Initiated logon request 20041006-22:57:38 : Received logon response 20041006-22:57:38 : Received ResendRequest FROM: 13 TO: 0 20041006-22:57:38 : Sent SequenceReset TO: 15 20041006-22:58:27 : Initiated logout request 20041006-22:58:27 : Received logout response 20041006-22:58:27 : Disconnecting 20041006-22:58:55 : Created session 20041006-22:58:55 : Connecting to 127.0.0.1 on port 65001 20041006-22:58:55 : Connection succeeded (crashes now) Any hints on what I might be doing wrong (or why I should avoid the whole concept) would be appreciated. I've included the code and settings below. It's pretty close to the samples given in the documentation, with some extra stuff to make it an mbean (the interface). Thanks, Brad. # default settings for sessions [DEFAULT] ConnectionType=3Dinitiator ReconnectInterval=3D60 SenderCompID=3DTW FileStorePath=3DD:\tmp\fixstore FileLogPath=3DD:\tmp\fixstore # session definition [SESSION] # inherit ConnectionType, ReconnectInterval and SenderCompID from default BeginString=3DFIX.4.2 TargetCompID=3DARCA StartTime=3D00:00:00 EndTime=3D23:59:59 HeartBtInt=3D20 SocketConnectPort=3D65001 SocketConnectHost=3D127.0.0.1 DataDictionary=3DD:\downloads\quickfix\spec\FIX42.xml /* * Two files, HelloWorld.java (which implements the MBean) and HelloWorldMBean.java which defines it. * I compile these, jar them and stick them in the jboss deploy directory. * The quickfix.jar also lives in there, but quickfix_jni.dll is in the $JBOSS_HOME/bin directory. * * The deployment descriptor is fairly simple, just specifies that HelloWorld.jar and quickfix.jar are on the classpath * and sets the helloMessage string to the name of the settings file and sets acceptor to true or false. * * The MBean deploys fine, but when I invoke startSessions() and a connection is established it crashes :( */ /* HelloWorld.java */ package com.test.mbean; import java.io.FileInputStream; import quickfix.Acceptor; import quickfix.Application; import quickfix.DefaultMessageFactory; import quickfix.DoNotSend; import quickfix.FieldNotFound; import quickfix.FileLogFactory; import quickfix.FileStoreFactory; import quickfix.IncorrectDataFormat; import quickfix.IncorrectTagValue; import quickfix.Initiator; import quickfix.LogFactory; import quickfix.Message; import quickfix.MessageFactory; import quickfix.MessageStoreFactory; import quickfix.RejectLogon; import quickfix.SessionID; import quickfix.SessionSettings; import quickfix.SocketAcceptor; import quickfix.SocketInitiator; import quickfix.UnsupportedMessageType; public class HelloWorld implements HelloWorldMBean, Application { =20 /* should really rename this var, left over from my hello world mbean.... */ private String helloMessage =3D "d:\tmp\session.ini"; private boolean isAcceptor =3D true; private Acceptor acceptor; private Initiator initiator; static { System.loadLibrary("quickfix_jni"); } /** * @return Returns the helloMessage. */ public String getHelloMessage() { return helloMessage; } /** * @param helloMessage The helloMessage to set. */ public void setHelloMessage(String helloMessage) { this.helloMessage =3D helloMessage; } public String startSession() { try { SessionSettings settings =3D new SessionSettings(new =20 FileInputStream(helloMessage)); MessageStoreFactory storeFactory =3D new FileStoreFactory(settings); LogFactory logFactory =3D new FileLogFactory(settings); MessageFactory messageFactory =3D new DefaultMessageFactory(); if (isAcceptor) { acceptor =3D new SocketAcceptor (this, storeFactory, settings, logFactory, =20 messageFactory); acceptor.start(); } else { initiator =3D new SocketInitiator (this, storeFactory, settings, logFactory, =20 messageFactory); initiator.start(); System.out.println("Initiator started"); } return getHelloMessage(); } catch (Exception e) { return "ERROR: " + e.getMessage(); } } public void stopSession() { if (acceptor !=3D null) { acceptor.stop(); } if (initiator !=3D null) { initiator.stop(); } } /** * @return Returns the acceptor. */ public boolean isAcceptor() { return isAcceptor; } /** * @param acceptor The acceptor to set. */ public void setAcceptor(boolean acceptor) { this.isAcceptor =3D acceptor; } /* auto generated methods for application */ /* (non-Javadoc) * @see quickfix.Application#onCreate(quickfix.SessionID) */ public void onCreate(SessionID arg0) { System.out.println("Session created: " + arg0); } /* (non-Javadoc) * @see quickfix.Application#onLogon(quickfix.SessionID) */ public void onLogon(SessionID arg0) { System.out.println("Logon: " + arg0); } /* (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, =20 quickfix.SessionID) */ public void toAdmin(Message arg0, SessionID arg1) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see quickfix.Application#toApp(quickfix.Message, =20 quickfix.SessionID) */ public void toApp(Message arg0, SessionID arg1) throws DoNotSend { // TODO Auto-generated method stub } /* (non-Javadoc) * @see quickfix.Application#fromAdmin(quickfix.Message, =20 quickfix.SessionID) */ public void fromAdmin(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon { // TODO Auto-generated method stub } /* (non-Javadoc) * @see quickfix.Application#fromApp(quickfix.Message, =20 quickfix.SessionID) */ public void fromApp(Message arg0, SessionID arg1) throws =20 FieldNotFound, IncorrectDataFormat, IncorrectTagValue, =20 UnsupportedMessageType { // TODO Auto-generated method stub } } /* HelloWorldMBean.java */ /* * The MBean interface declaration defines what * methods are availble to the mbean server */ package com.test.mbean; public interface HelloWorldMBean { public void setHelloMessage(String helloMessage); public String getHelloMessage(); public void setAcceptor(boolean acceptor); public boolean isAcceptor(); public String startSession(); public void stopSession(); } |
From: Jon D. <jd...@wi...> - 2004-10-05 15:38:09
|
Yes, I'm using SocketAcceptor, not ThreadedSocketAcceptor. -jd- > Are you using the SocketAcceptor? Looking at it it looks to me like > the ThreadedSocketAcceptor is handling this situation correctly by > registering Session usage, but SocketAcceptor doesn't appear to be > doing so. > > --oren > > On Oct 5, 2004, at 9:41 AM, Jon Dahl wrote: > >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX FAQ: >> http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> It seems that if a client connects to an Acceptor app with a >> SenderCompID >> already connected, it causes the MsgSeqNum to change to the new >> connection >> instead of just dropping the connection. >> >> Subsequently, the valid client can't enter valid messages until either >> it >> disconnects or the server is restarted. We reset our sequence numbers >> after disconnect and logoff. Those who don't, may run into a bigger >> problem. >> >> Anyone else run into this? >> >> QF 1.9.0 >> RHAS 2.1 >> gcc 3.04 >> -------- >> config: >> ..... >> ResetOnDisconnect=Y >> ResetOnLogout=Y >> >> -jd- >> >> >> >> >> ------------------------------------------------------- >> This SF.net email is sponsored by: IT Product Guide on >> ITManagersJournal >> Use IT products in your business? Tell us what you think of them. Give >> us >> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out >> more >> http://productguide.itmanagersjournal.com/guidepromo.tmpl >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers -- |
From: Oren M. <or...@qu...> - 2004-10-05 15:29:54
|
Are you using the SocketAcceptor? Looking at it it looks to me like the ThreadedSocketAcceptor is handling this situation correctly by registering Session usage, but SocketAcceptor doesn't appear to be doing so. --oren On Oct 5, 2004, at 9:41 AM, Jon Dahl wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > It seems that if a client connects to an Acceptor app with a > SenderCompID > already connected, it causes the MsgSeqNum to change to the new > connection > instead of just dropping the connection. > > Subsequently, the valid client can't enter valid messages until either > it > disconnects or the server is restarted. We reset our sequence numbers > after disconnect and logoff. Those who don't, may run into a bigger > problem. > > Anyone else run into this? > > QF 1.9.0 > RHAS 2.1 > gcc 3.04 > -------- > config: > ..... > ResetOnDisconnect=Y > ResetOnLogout=Y > > -jd- > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on > ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give > us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out > more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Jon D. <jd...@wi...> - 2004-10-05 14:50:01
|
It seems that if a client connects to an Acceptor app with a SenderCompID already connected, it causes the MsgSeqNum to change to the new connection instead of just dropping the connection. Subsequently, the valid client can't enter valid messages until either it disconnects or the server is restarted. We reset our sequence numbers after disconnect and logoff. Those who don't, may run into a bigger problem. Anyone else run into this? QF 1.9.0 RHAS 2.1 gcc 3.04 -------- config: ..... ResetOnDisconnect=Y ResetOnLogout=Y -jd- |
From: Caleb E. <cal...@gm...> - 2004-10-01 19:30:58
|
The following code in FIX::Parser::allocate causes a UMR (uninitialized memory read) and/or an ABR (array bounds read) under Purify. if( m_readBuffer && m_bufferSize ) { strncpy (newBuffer, m_readBuffer, length); // ABR/UMR here newBuffer[length] = '\0'; delete [] m_readBuffer; } When Parser::readFromStream calls this, it has not yet nul-terminated m_readBuffer, so the strncpy call is straying past the end of the allocated storage. The code should instead look like: if (m_readBuffer && m_bufferSize) { memcpy (newBuffer, m_readBuffer, m_bufferSize); newBuffer[m_bufferSize] = '\0'; delete [] m_readBuffer; } Also, in socket_init in Utility.cpp, the struct sigaction sa is not initialized, which causes a UMR. Changing the code to: struct sigaction sa = {0}; fixes that problem. -- Caleb Epstein cal...@gm... |
From: Caleb E. <cal...@gm...> - 2004-10-01 14:07:39
|
Attached please find my implementation of a Berkeley DB-backed QuickFIX MessageStore class called "BDBMsgStore" (with associated "BDBMSgStoreFactory") The BDBMsgStore can be configured to use system memory (DB_SYSTEM_MEM) for the shared memory regions (default is mmap'ed files) and/or transactional semantics (DB_AUTO_COMMIT) for all writes. This class depends on the following configuration settings to operate: DBStorePath (string, global): directory where the database files will be written. Will be created if it does not exist. DBUseShm (boolean, global): if enabled, the Berkeley DB environment will be configured with the DB_SYSTEM_MEM flag DBShmKey (integer, global): if DBUseShm is enabled, this should also be set. This is the key that will be used to create the shared memory region. DBAutoCommit (boolean, per connection): if enabled, turns on transactional semantics for all database writes on a connection. Not enabled by default. Additionally, Berkeley DB will read a file called DB_CONFIG if it exists in the environment home directory (DBStorePath). You can tune things at a very fine-grained level with this file. Please refer to the Berkeley DB documentation for details. I've done a bunch of testing on this code, and it seems to work well and is quite fast. Without transactions enabled, I'm able to push approximately 7,000-8.000 small NewOrderSingle requests per second through this store on a 2-way Xeon 3.2 GHz writing to (I believe) a 5400 RPM IDE drive. This is actually on par with the MemoryStore, which gives be about 8,500 msgs/second on the same hardware. With transactions enabled, this number drops to around 200 msgs/sec. Please let me know if you have any questions with this implementation (or find bugs in it). I would be happy to see it included in future releases of QuickFIX, and am releasing it under the terms of the QuickFIX software license, version 1.0 -- Caleb Epstein cal...@gm... |