2 //=============================================================================
4 * @file TAO_Service.cpp
6 * This directory contains an example that illustrates how the ACE
7 * Service Configurator can dynamically configure an ORB and its
8 * servants from a svc.conf file.
10 * @author Priyanka Gontla <pgontla@ece.uci.edu>
12 //=============================================================================
15 #include "orbsvcs/Log_Macros.h"
16 #include "tao/ORB_Constants.h"
18 #include "ace/Service_Config.h"
19 #include "orbsvcs/Log_Macros.h"
20 #include "ace/Signal.h"
21 #include "ace/Time_Value.h"
22 #include "ace/Argv_Type_Converter.h"
24 extern "C" void handler (int)
26 ACE_Service_Config::reconfig_occurred (1);
30 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
34 // ORB initialization boiler plate...
35 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
37 ACE_Sig_Action
sa ((ACE_SignalHandler
) handler
, SIGHUP
);
41 ACE_Time_Value
tv (5, 0);
43 orb
->perform_work (tv
);
45 ORBSVCS_DEBUG ((LM_DEBUG
,
46 "Reconfig flag = %d\n",
47 ACE_Service_Config::reconfig_occurred ()));
49 if (ACE_Service_Config::reconfig_occurred ())
50 ACE_Service_Config::reconfigure ();
54 catch (const CORBA::Exception
& ex
)
56 ex
._tao_print_exception (argv
[0]);