Re: [Quickfix-developers] How to stop a session?
Brought to you by:
orenmnero
From: <GM...@Pr...> - 2002-11-18 22:59:32
|
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 = =20 OM...@th... = =20 Sent by: To: = td...@ho..., =20 qui...@li...urc <quick= fix...@li...> =20 eforge.net cc: = =20 Subjec= t: Re: [Quickfix-developers] How to stop a session? =20 = =20 11/18/02 04:10 PM = =20 = =20 = =20 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 = |