Thread: [Quickfix-developers] Callink callstack methods from application code?
Brought to you by:
orenmnero
|
From: Andrei G. <an...@gm...> - 2005-09-08 21:16:32
|
Hi all, I am trying to "trace" method calls in order to understand what happens when the engine transmits and receives messages (i will probably have to add built-in encryption support for my applications in the near future). I noticed that there is a CallStack object that is used to keep a trace of method calls. I was wondering if this object can be used in the application code so that I can Inspect the stack trace(CallStack::output(), maybe?), for example, when control reaches "Application" methods(fromApp, toApp, ....). I am currently using version 1.10.2 via the .NET API, which does not seem to export the output method. Any help will be much appreciated, Regards, Andrei |
|
From: Dale W. <wil...@oc...> - 2005-09-15 20:26:13
|
QuickFIX 1.10.2: C++; Windows XP I have a question about the proper sequence of messages during logout (and whether QuckFIX is doing "the right thing.") This shows up during a unit test for our application. The application is acting as an initiator The test is trivial: logon, wait for the onLogon callback; then logout, wait for the onLogout callback A condensed version of the log produced by this test is: 15:00:47.893000 (FIX.4.2:CLIENT->EXSIM) session->logon() 15:00:47.893000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin 8=FIX.4.2|9=66|35=A|34=1|49=CLIENT|52=20050915-20:00:47.000|56=EXSIM|98=0|108=30|10=056| 15:00:47.908000 (FIX.4.2:CLIENT->EXSIM) Application::fromAdmin 8=FIX.4.2|9=66|35=A|34=1|49=EXSIM|52=20050915-20:00:47.000|56=CLIENT|98=0|108=30|10=056| 15:00:47.924000 (FIX.4.2:CLIENT->EXSIM) Application::onLogon 15:00:47.924000 (FIX.4.2:CLIENT->EXSIM) session->logout() 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin 8=FIX.4.2|9=54|35=5|34=2|49=CLIENT|52=20050915-20:00:48.000|56=EXSIM|10=018| 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::onLogout 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::fromAdmin 8=FIX.4.2|9=54|35=5|34=2|49=EXSIM|52=20050915-20:00:48.000|56=CLIENT|10=018| 15:00:48.049000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin 8=FIX.4.2|9=54|35=5|34=3|49=CLIENT|52=20050915-20:00:48.000|56=EXSIM|10=019| Two things I see: #1: the onLogout callback happens before the Logout reply from the counterparty, and #2: an "extra" Logout message is being sent: presumably in response to the Logout from the counterparty. Is this correct behavior? Dale PS: #1 led to an interesting race condition when we started the next test which managed to send a login *before* the logout reply came from the counterparty, but that's another issue. |
|
From: Dale W. <wil...@oc...> - 2005-09-16 14:14:31
|
I have some more info on the problem below-- enough to convince myself that it is an error in QuickFIX, and not a misunderstanding on my part. The second logout message is sent because the SessionState::m_sentLogout is being set to false too soon. When the Logout arrives from the other end, this bool is false so, QuickFIX assumes that the other end is initiating the logout process. sentLogout(false) is being called from Session::disconnect which also calls Application::onLogout. Therefore it appears the two symptoms I observed below are related -- both seem to happen because Session::disconnect is being called too soon. I'll go ahead and put this information in Bugzilla. Dale Dale Wilson wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > QuickFIX 1.10.2: C++; Windows XP > > I have a question about the proper sequence of messages during logout > (and whether QuckFIX is doing "the right thing.") > > This shows up during a unit test for our application. > The application is acting as an initiator > The test is trivial: logon, wait for the onLogon callback; then > logout, wait for the onLogout callback > > A condensed version of the log produced by this test is: > > 15:00:47.893000 (FIX.4.2:CLIENT->EXSIM) session->logon() > 15:00:47.893000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin > 8=FIX.4.2|9=66|35=A|34=1|49=CLIENT|52=20050915-20:00:47.000|56=EXSIM|98=0|108=30|10=056| > > 15:00:47.908000 (FIX.4.2:CLIENT->EXSIM) Application::fromAdmin > 8=FIX.4.2|9=66|35=A|34=1|49=EXSIM|52=20050915-20:00:47.000|56=CLIENT|98=0|108=30|10=056| > > 15:00:47.924000 (FIX.4.2:CLIENT->EXSIM) Application::onLogon > 15:00:47.924000 (FIX.4.2:CLIENT->EXSIM) session->logout() > 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin > 8=FIX.4.2|9=54|35=5|34=2|49=CLIENT|52=20050915-20:00:48.000|56=EXSIM|10=018| > > 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::onLogout > 15:00:48.033000 (FIX.4.2:CLIENT->EXSIM) Application::fromAdmin > 8=FIX.4.2|9=54|35=5|34=2|49=EXSIM|52=20050915-20:00:48.000|56=CLIENT|10=018| > > 15:00:48.049000 (FIX.4.2:CLIENT->EXSIM) Application::toAdmin > 8=FIX.4.2|9=54|35=5|34=3|49=CLIENT|52=20050915-20:00:48.000|56=EXSIM|10=019| > > > Two things I see: > #1: the onLogout callback happens before the Logout reply from the > counterparty, and > #2: an "extra" Logout message is being sent: presumably in response to > the Logout from the counterparty. > > Is this correct behavior? > > Dale > > PS: #1 led to an interesting race condition when we started the next > test which managed to send a login *before* the logout reply came > from the counterparty, but that's another issue. > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers -- ----------------------------------------------------- Dale Wilson, Senior Software Engineer Object Computing, Inc. (OCI) http://www.ociweb.com/ http://www.theaceorb.com/ ---------------------------------------------------- |