1 #include "orbsvcs/Log_Macros.h"
2 #include "ace/Arg_Shifter.h"
3 #include "Trading_Service.h"
5 Trading_Shutdown::Trading_Shutdown (Trading_Service
& trader
)
8 if (this->shutdown_
.register_handler (SIGINT
,
10 ORBSVCS_ERROR ((LM_ERROR
,
12 ACE_TEXT("register_handler")));
14 if (this->shutdown_
.register_handler (SIGTERM
,
16 ORBSVCS_ERROR ((LM_ERROR
,
18 ACE_TEXT("register_handler")));
22 Trading_Shutdown::handle_signal (int,
26 this->trader_
.~Trading_Service ();
31 Trading_Service::~Trading_Service ()
37 Trading_Service::init (int argc
, ACE_TCHAR
*argv
[])
39 int const result_trader
= this->trading_loader_
.init (argc
, argv
);
41 if (result_trader
== -1)
48 Trading_Service::run ()
50 Trading_Shutdown
trading_shutdown (*this);
52 return this->trading_loader_
.run ();
56 Trading_Service::shutdown ()
58 // Invoke TAO_Trading_Loader::fini ()
59 int const shutdown_result
= this->trading_loader_
.fini ();
61 if (shutdown_result
== -1)