#include <PI.h>
Static Public Member Functions | |
| static int | Initializer (void) |
| Used to force the initialization of the ORB code. | |
Definition at line 32 of file PI.h.
| int TAO_PI_Init::Initializer | ( | void | ) | [static] |
Used to force the initialization of the ORB code.
Register the PI ORBInitializer.
Definition at line 22 of file PI.cpp.
{
#if TAO_HAS_INTERCEPTORS == 1
ACE_Service_Config::process_directive (ace_svc_desc_TAO_ClientRequestInterceptor_Adapter_Factory_Impl);
ACE_Service_Config::process_directive (ace_svc_desc_TAO_PICurrent_Loader);
#endif /* TAO_HAS_INTERCEPTORS == 1 */
int const status = ACE_Service_Config::process_directive (
ace_svc_desc_ORBInitializer_Registry);
#if TAO_HAS_INTERCEPTORS == 1
PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
PortableInterceptor::ORBInitializer::_nil ();
PortableInterceptor::ORBInitializer_var orb_initializer;
try
{
/// Register the PI ORBInitializer.
ACE_NEW_THROW_EX (temp_orb_initializer,
TAO_PI_ORBInitializer,
CORBA::NO_MEMORY (
CORBA::SystemException::_tao_minor_code (
TAO::VMCID,
ENOMEM),
CORBA::COMPLETED_NO));
orb_initializer = temp_orb_initializer;
PortableInterceptor::register_orb_initializer (orb_initializer.in ());
}
catch (const ::CORBA::Exception& ex)
{
if (TAO_debug_level > 0)
{
ex._tao_print_exception ("(%P | %t) Caught exception:");
}
return -1;
}
#endif /* TAO_HAS_INTERCEPTORS == 1 */
return status;
}
1.7.0