Re: [Quickfix-developers] How to stop a session?
Brought to you by:
orenmnero
From: <GM...@Pr...> - 2002-11-19 21:12:25
|
My request for an interface to start and stop the session comes mostly during our testing phases where we need to recycle the session once in = a while. I apologize if the request comes out of ignorance (we are still= relatively new to FIX messaging), but we need to basically delete the s= tore files whenever we want to simiulate a new session (i.e. start over). F= or now, this isn't a big deal for us, but I have seen it in the API of oth= er FIX engines, so I thought others might find it useful. Clearly though, the issue with groups and repeating groups via Java aff= ects us much more. We will probably need to spend more time with those type= s of issues than with issues like controlling the session. Thanks, Gary Mui Prescient Markets, Inc 914-989-3118 (W) 445 Hamilton Avenue 914-422-3693 (F) White Plains, NY 10601 Please visit us at http://www.cpmarket.com = =20 OM...@th... = =20 Sent by: To: = GM...@Pr... =20 qui...@li...urc cc: = qui...@li..., =20 eforge.net quickf= ix-...@li..., =20 tdjob@= hotmail.com =20 Subjec= t: Re: [Quickfix-developers] How to stop a session? =20 11/18/02 07:06 PM = =20 = =20 = =20 The only way to do this currently is by setting the session times in yo= ur configuration file. By doing that you can have sessions start and stop= during various times of day. I guess to do what you want some sort of boolean is needed to allow you to override the session times. Is this = what you are thinking of? --oren GMui@PrescientMar kets.com To: OM...@th... cc: qui...@li..., 11/18/2002 04:59 qui...@li..., td...@ho... PM Subject: Re: [Quickfix-developers] How to stop a session? Is there any planned way to do shut down a session on a per-session lev= el rather than the entire engine? Gary Mui Prescient Markets, Inc 914-989-3118 (W) 445 Hamilton Avenue 914-422-3693 (F) White Plains, NY 10601 Please visit us at http://www.cpmarket.com OM...@th... Sent by: To: td...@ho..., qui...@li...urc <qui...@li...> eforge.net cc: Subjec= t: Re: [Quickfix-developers] How to stop a session? 11/18/02 04:10 PM The proper way to stop the initiator is simply to let the onRun method exit. This will cause the initiator to close itself down. --oren |---------+-----------------------------------------------> | | "Danis Tazeev" <td...@ho...> | | | Sent by: | | | qui...@li...ur| | | ceforge.net | | | | | | | | | 11/18/2002 10:51 AM | | | | |---------+-----------------------------------------------> > -----------------------------------------------------------------------= -----------------------| | | | To: <qui...@li...> | | cc: | | Subject: [Quickfix-developers] How to stop a session? | > -----------------------------------------------------------------------= -----------------------| Folks, I am experimenting with QuickFix using Java interfcace, and I have a co= uple of questions. I have created a CLIENT (initiator) and a SERVER (accepto= r) which run on different JVM. A structure of both programs is idential excluding that the CLIENT uses Initiator class and the SERVER uses Acce= ptor class. Initially both of them create initiator or acceptor objects and start them. The object that implements Application interface is a simple logg= er with an inifinite loop in onRun(). Acceptor.start() method is blocked u= ntil onRun() is running. That's why the SERVER listens infinitely. I intend to send messages being outside from onRun() method of clients.= To make this possible I start a simple thread that starts initiator. Something like this: (new Thread() { public void run() { initiator.statr(); } }).start(); where initiator is an instance of Initiator class. After that the CLIENT goes to sleep for awhile (10 secodns). The SERVER= and the CLIENT successfully establish a session and wait. When the CLIENT w= akes up it just tries to stop the "started" initiator. The call to Initiator.stop() method doesn't return and the session doesn't finish. Instead onRun() is called again. And when the time of Heartbeat message= comes up LOGON procedure is initiated. See the log (FIX 4.1): [22:15,511]: CLIENT: ON_CREATE [22:15,521]: CLIENT: ON_RUN [22:25,516]: CLIENT: ON_RUN <-- !!! trying to stop() [22:26,478]: CLIENT: TO_ADMIN: ...35=3DA=0134=3D1=01... [22:26,528]: CLIENT: FROM_ADMIN: ...35=3DA=0134=3D1... [22:26,528]: CLIENT: ON_LOGOUT [22:56,572]: CLIENT: TO_ADMIN: ...35=3D0=0134=3D2... [23:26,616]: CLIENT: TO_ADMIN: ...35=3D1=0134=3D3... [23:56,740]: CLIENT: TO_ADMIN: ...35=3D1=0134=3D4... [24:26,814]: CLIENT: TO_ADMIN: ...35=3D1=0134=3D5... [24:56,858]: CLIENT: ON_LOGOUT [25:02,857]: CLIENT: TO_ADMIN: ...35=3DA=0134=3D6... <--- Again [25:02,867]: CLIENT: FROM_ADMIN: ...35=3DA=0134=3D2... [25:02,867]: CLIENT: ON_LOGON [25:02,877]: CLIENT: FROM_ADMIN: ...35=3D2=0134=3D3... [25:02,877]: CLIENT: TO_ADMIN: ...35=3D4=0134=3D2... [25:32,911]: CLIENT: TO_ADMIN: ...35=3D0=0134=3D7... [25:32,911]: CLIENT: FROM_ADMIN: ...35=3D2=0134=3D4... [25:32,911]: CLIENT: TO_ADMIN: ...35=3D4=0134=3D6... [26:02,034]: CLIENT: FROM_ADMIN: ...35=3D0=0134=3D5... [26:02,044]: CLIENT: ON_LOGOUT An unexpected exception has been detected in native code outside the VM= . Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=3D0x8a1ee= 0a Function name=3D(N/A) Library=3D(N/A) Current Java thread: at org.quickfix.SocketInitiator.doStart(Native Method) at org.quickfix.SocketInitiator.start(Unknown Source) at rawclient.Client$1.run(Client.java:37) at java.lang.Thread.run(Unknown Source) Is it allowed to use QuickFix this way? Where am I wrong? I don't know where to dig. Thanks. Danis Tazeev ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers = |