#include <PI_ORBInitializer.h>
Inheritance diagram for TAO_PI_ORBInitializer:
Public Member Functions | |
PortableInterceptor::ORBInitializer methods | |
void | pre_init (PortableInterceptor::ORBInitInfo_ptr info) throw (CORBA::SystemException) |
void | post_init (PortableInterceptor::ORBInitInfo_ptr info) throw (CORBA::SystemException) |
Private Member Functions | |
void | register_policy_factories (PortableInterceptor::ORBInitInfo_ptr info) |
Register PortableInterceptor policy factories. | |
Private Attributes | |
PortableInterceptor::PolicyFactory_var | policy_factory_ |
Instance of the PI policy factory. |
Definition at line 38 of file PI_ORBInitializer.h.
|
Definition at line 28 of file PI_ORBInitializer.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, and CORBA::is_nil().
00032 { 00033 // The PI policy factory is stateless and reentrant, so share a 00034 // single instance between all ORBs. 00035 if (CORBA::is_nil (this->policy_factory_.in ())) 00036 { 00037 PortableInterceptor::PolicyFactory_ptr policy_factory; 00038 ACE_NEW_THROW_EX (policy_factory, 00039 TAO_PI_PolicyFactory, 00040 CORBA::NO_MEMORY ( 00041 CORBA::SystemException::_tao_minor_code ( 00042 TAO::VMCID, 00043 ENOMEM), 00044 CORBA::COMPLETED_NO)); 00045 ACE_CHECK; 00046 00047 this->policy_factory_ = policy_factory; 00048 } 00049 00050 00051 this->register_policy_factories (info 00052 ACE_ENV_ARG_PARAMETER); 00053 ACE_CHECK; 00054 } |
|
Definition at line 19 of file PI_ORBInitializer.cpp.
00022 { 00023 ACE_UNUSED_ARG (info); 00024 } |
|
Register PortableInterceptor policy factories.
Definition at line 58 of file PI_ORBInitializer.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, and ACE_TRY_CHECK.
00061 { 00062 // Register the PI policy factory. 00063 00064 // Bind the same policy factory to all PortableInterceptor related policy 00065 // types since a single policy factory is used to create each of the 00066 // different types of PortableInterceptor policies. 00067 CORBA::PolicyType type[] = { 00068 PortableInterceptor::PROCESSING_MODE_POLICY_TYPE 00069 }; 00070 00071 const CORBA::PolicyType *end = type + sizeof (type) / sizeof (type[0]); 00072 00073 for (CORBA::PolicyType *i = type; i != end; ++i) 00074 { 00075 ACE_TRY 00076 { 00077 info->register_policy_factory (*i, 00078 this->policy_factory_.in () 00079 ACE_ENV_ARG_PARAMETER); 00080 ACE_TRY_CHECK; 00081 } 00082 ACE_CATCH (CORBA::BAD_INV_ORDER, ex) 00083 { 00084 if (ex.minor () == (CORBA::OMGVMCID | 16)) 00085 { 00086 // The factory is already there, it happens because the 00087 // magic initializer in PI_Initializer.cpp registers 00088 // with the ORB multiple times. This is an indication 00089 // that we should do no more work in this 00090 // ORBInitializer. 00091 return; 00092 } 00093 ACE_RE_THROW; 00094 } 00095 ACE_CATCHANY 00096 { 00097 // Rethrow any other exceptions... 00098 ACE_RE_THROW; 00099 } 00100 ACE_ENDTRY; 00101 ACE_CHECK; 00102 } 00103 } |
|
Instance of the PI policy factory. The PI policy factory is stateless and reentrant, so share a single instance between all ORBs. Definition at line 75 of file PI_ORBInitializer.h. |