Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / TAO_Service / TAO_Service.cpp
blobce7ff89c0d563ffa5f234b2f3ad00d6c752d9d48
2 //=============================================================================
3 /**
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"
17 #include "tao/ORB.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);
29 int
30 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
32 try
34 // ORB initialization boiler plate...
35 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
37 ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGHUP);
39 for (;;)
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]);
59 return -1;