1 #include "DLL_TAO_Service.h"
3 ACE_DLL_SERVICE_IMPL (ACE_DLL_TAO_Service
, _make_ACE_DLL_TAO_Service
)
5 ACE_DLL_TAO_Service::ACE_DLL_TAO_Service (void)
7 ACE_DLL_TAO_SERVICE_TRACE (ACE_TEXT ("ACE_DLL_TAO_Service::ACE_DLL_TAO_Service (void)"));
10 ACE_DLL_TAO_Service::~ACE_DLL_TAO_Service (void)
12 ACE_DLL_TAO_SERVICE_TRACE (ACE_TEXT ("ACE_DLL_TAO_Service::~ACE_DLL_TAO_Service (void)"));
15 int ACE_DLL_TAO_Service::init (int argc
, ACE_TCHAR
* argv
[])
17 ACE_DLL_TAO_SERVICE_TRACE (ACE_TEXT ("ACE_DLL_TAO_Service::init (int, ACE_TCHAR * [])"));
22 ACE_TEXT ("(%t) %T - %M - initializing the CORBA ORB\n")));
23 this->orb_
= CORBA::ORB_init (argc
, argv
);
25 // This call should fail unless '-ORBGestalt CURRENT' is passed as a command-line
26 // option during ORB_init (...).
28 ACE_TEXT ("(%t) %T - %M - resolving the RootPOA\n")));
30 CORBA::Object_var obj
=
31 this->orb_
->resolve_initial_references ("RootPOA");
32 this->root_poa_
= PortableServer::POA::_narrow (obj
.in ());
34 catch (const CORBA::Exception
& ex
)
37 ACE_TEXT ("(%t) %T - %M - %s\n"),
38 ex
._info ().c_str ()));
45 int ACE_DLL_TAO_Service::fini (void)
47 ACE_DLL_TAO_SERVICE_TRACE (ACE_TEXT ("ACE_DLL_TAO_Service::fini (void)"));
51 this->orb_
->shutdown (1);
53 this->root_poa_
->destroy (1, 1);
54 this->orb_
->destroy ();
56 catch (const CORBA::Exception
& ex
)
59 ACE_TEXT ("(%t) %T - %M - %s\n"),
60 ex
._info ().c_str ()));