2 #include "ace/Reactor.h"
3 #include "ace/Signal.h"
4 #include "ace/Service_Config.h"
5 #include "ace/Log_Msg.h"
7 ACE_TCHAR
const * const scpc_loadOrb
= ACE_DYNAMIC_SERVICE_DIRECTIVE(
11 "testDllOrb -ORBDebugLevel 0 -ORBId testDllOrb -NumThreads 2 -ORBDottedDecimalAddresses 1 -ORBCollocationStrategy thru_poa"
14 ACE_TCHAR
const * const scpc_unloadOrb
= ACE_REMOVE_SERVICE_DIRECTIVE("testDllOrb");
17 ACE_TMAIN(int, ACE_TCHAR
**)
21 ACE_Service_Config serviceConfig
;
24 ACE_OS::sprintf(signum
, "%d", SIGUSR1
);
31 result
= serviceConfig
.open (
34 ACE_DEFAULT_LOGGER_KEY
,
35 1, // ignore_static_svcs = 1,
36 1, // ignore_default_svc_conf_file = 0,
37 0 // ignore_debug_flag = 0
41 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("(%P|%t) Error: serviceConfig.open failed\n")));
44 ACE_DEBUG ((LM_INFO
, ACE_TEXT ("(%P|%t) serviceConfig.open done\n")));
47 for(int cnt
= 0; cnt
< 1000; ++cnt
)
49 ACE_DEBUG ((LM_INFO
, ACE_TEXT ("(%P|%t) Loading ORB cnt = %d\n"), cnt
));
50 result
= ACE_Service_Config::process_directive(scpc_loadOrb
);
53 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("(%P|%t) Error loading ORB failed (%d)\n"), result
));
56 ACE_DEBUG ((LM_INFO
, ACE_TEXT ("(%P|%t) Loading ORB done\n")));
58 result
= ACE_Service_Config::process_directive(scpc_unloadOrb
);
61 ACE_ERROR ((LM_ERROR
, ACE_TEXT ("(%P|%t) Error unloading ORB failed (%d)\n"), result
));
64 ACE_DEBUG ((LM_INFO
, ACE_TEXT ("(%P|%t) Unloading ORB done\n")));