1 #include "ace/Service_Config.h"
2 #include "orbsvcs/Notify_Service/Notify_Service.h"
3 #include "orbsvcs/CosNotifyChannelAdminC.h"
4 #include "orbsvcs/CosNamingC.h"
8 ACE_TCHAR
const * const scpc_loadOrb
= ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE(
13 "testDllOrb -ORBDebugLevel 0 -ORBId testDllOrb -ORBDottedDecimalAddresses 1"
16 ACE_TCHAR
const * const scpc_unloadOrb
= ACE_REMOVE_SERVICE_DIRECTIVE("testDllOrb");
18 ACE_TCHAR
const * const scpc_loadNotifyService
= ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE(
22 "_make_TAO_Notify_Service_Driver_INCORRECT",
23 "-NoNameSvc -RunThreads 0"
26 ACE_TCHAR
const * const scpc_unloadNotifyService
= ACE_REMOVE_SERVICE_DIRECTIVE("testNotifyService");
28 void loadunloadcycle()
32 ACE_TEXT ("(%P|%t) loadunloadcycle - loading\n")
35 int result
= ACE_Service_Config::process_directive(scpc_loadOrb
);
38 ACE_TEXT ("(%P|%t) loadunloadcycle - loading ORB done. Result: <%d>\n"),
43 ACE_Dynamic_Service
<DllORB
>::instance("testDllOrb");
45 CORBA::ORB_var v_orb
= p_orb
->orb();
48 ACE_TEXT ("(%P|%t) loadunloadcycle - v_orb OK\n")
51 CORBA::Object_var v_poa
=
52 v_orb
->resolve_initial_references("RootPOA");
55 ACE_TEXT ("(%P|%t) loadunloadcycle - v_poa OK\n")
58 PortableServer::POA_var v_rootPOA
=
59 PortableServer::POA::_narrow(v_poa
.in ());
62 ACE_TEXT ("(%P|%t) loadunloadcycle - v_rootPOA OK\n")
65 result
= ACE_Service_Config::process_directive(scpc_loadNotifyService
);
68 ACE_TEXT ("(%P|%t) loadunloadcycle - loading NotifyService done. Result: <%d>\n"),
72 TAO_Notify_Service_Driver
* p_notifyService
=
73 ACE_Dynamic_Service
<TAO_Notify_Service_Driver
>::instance("testNotifyService");
75 ACE_UNUSED_ARG (p_notifyService
);
79 ACE_TEXT ("(%P|%t) loadunloadcycle - unloading\n")
84 ACE_TEXT ("(%P|%t) loadunloadcycle - unloading NotifyService ...\n")
86 result
= ACE_Service_Config::process_directive(scpc_unloadNotifyService
);
89 ACE_TEXT ("(%P|%t) loadunloadcycle - unloading NotifyService done. Result: <%d>\n"),
95 ACE_TEXT ("(%P|%t) loadunloadcycle - unloading ORB ...\n")
97 result
= ACE_Service_Config::process_directive(scpc_unloadOrb
);
100 ACE_TEXT ("(%P|%t) loadunloadcycle - unloading ORB done. Result: <%d>\n"),
105 int ACE_TMAIN (int , ACE_TCHAR
**)
109 ACE_TEXT ("(%P|%t) main - entered\n")
114 ACE_TEXT ("(%P|%t) main - cycle 1 ...\n")
119 ACE_TEXT ("(%P|%t) main - cycle 1 done\n")
124 ACE_TEXT ("(%P|%t) main - cycle 2 ...\n")
129 ACE_TEXT ("(%P|%t) main - cycle 2 done\n")
134 ACE_TEXT ("(%P|%t) main - leaving\n")