Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ORB_Local_Config / Bug_2612 / Test.cpp
blob50554ad2e87826a40b5be7cb5d0af367f1191504
1 /*
2 * @author Iliyan jeliazkov <iliyan@ociweb.com>
3 * @author Lothar Werzinger <lothar@tradescape.biz>
4 */
6 #include "ace/Service_Config.h"
7 #include "tao/corba.h"
8 #include "ace/OS_NS_unistd.h"
10 ACE_TCHAR const * const scpc_loadOrb = // NOTE due to the way ACE_DYNAMIC_SERVICE_DIRECTIVE() macro is defined,
11 // each parameter CANNOT be split into multiple quoted strings "line1" "nextline" with the expectation that
12 // they will be join together. Hence the long parameter 4.
13 ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE ("testDllOrb",
14 "DllOrb",
15 TAO_VERSION,
16 "_make_DllOrb",
17 "DllOrb -t 1 -ORBGestalt Local -ORBDebugLevel 3 -ORBId testORB -ORBInitRef NameService=file:///tmp/test-ns.ior -ORBDottedDecimalAddresses 1"
20 ACE_TCHAR const * const scpc_unloadOrb = ACE_REMOVE_SERVICE_DIRECTIVE ("testDllOrb");
22 int ACE_TMAIN (int, ACE_TCHAR *[])
24 ACE_DEBUG ((LM_DEBUG,"\nbefore first load process directive\n"));
25 if (0 > ACE_Service_Config::process_directive (scpc_loadOrb))
26 return -1;
28 ACE_OS::sleep(2);
30 ACE_DEBUG ((LM_DEBUG,"\nbefore first unload process directive\n"));
31 if (0 > ACE_Service_Config::process_directive (scpc_unloadOrb))
32 return -1;
34 ACE_OS::sleep(2);
35 ACE_DEBUG ((LM_DEBUG, "\nMAIN (%P|%t) Lather, Rince, Repeat ...\n"));
37 if (0 > ACE_Service_Config::process_directive (scpc_loadOrb))
38 return -1;
40 ACE_OS::sleep(2);
42 if (0 > ACE_Service_Config::process_directive (scpc_unloadOrb))
43 return -1;
45 return 0;