#include <PI_ORBInitializer.h>
Inheritance diagram for TAO_PI_ORBInitializer:


Public Member Functions | |
PortableInterceptor::ORBInitializer methods | |
| void | pre_init (PortableInterceptor::ORBInitInfo_ptr info) |
| void | post_init (PortableInterceptor::ORBInitInfo_ptr info) |
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 26 of file PI_ORBInitializer.cpp. References ACE_NEW_THROW_EX, CORBA::is_nil(), policy_factory_, and register_policy_factories().
00027 {
00028 // The PI policy factory is stateless and reentrant, so share a
00029 // single instance between all ORBs.
00030 if (CORBA::is_nil (this->policy_factory_.in ()))
00031 {
00032 PortableInterceptor::PolicyFactory_ptr policy_factory;
00033 ACE_NEW_THROW_EX (policy_factory,
00034 TAO_PI_PolicyFactory,
00035 CORBA::NO_MEMORY (
00036 CORBA::SystemException::_tao_minor_code (
00037 TAO::VMCID,
00038 ENOMEM),
00039 CORBA::COMPLETED_NO));
00040
00041 this->policy_factory_ = policy_factory;
00042 }
00043
00044 this->register_policy_factories (info);
00045 }
|
|
|
Definition at line 20 of file PI_ORBInitializer.cpp.
00021 {
00022 }
|
|
|
Register PortableInterceptor policy factories.
Definition at line 49 of file PI_ORBInitializer.cpp. Referenced by post_init().
00051 {
00052 // Register the PI policy factory.
00053
00054 // Bind the same policy factory to all PortableInterceptor related policy
00055 // types since a single policy factory is used to create each of the
00056 // different types of PortableInterceptor policies.
00057 CORBA::PolicyType type[] = {
00058 PortableInterceptor::PROCESSING_MODE_POLICY_TYPE
00059 };
00060
00061 const CORBA::PolicyType *end = type + sizeof (type) / sizeof (type[0]);
00062
00063 for (CORBA::PolicyType *i = type; i != end; ++i)
00064 {
00065 try
00066 {
00067 info->register_policy_factory (*i, this->policy_factory_.in ());
00068 }
00069 catch (const ::CORBA::BAD_INV_ORDER& ex)
00070 {
00071 if (ex.minor () == (CORBA::OMGVMCID | 16))
00072 {
00073 // The factory is already there, it happens because the
00074 // magic initializer in PI_Initializer.cpp registers
00075 // with the ORB multiple times. This is an indication
00076 // that we should do no more work in this
00077 // ORBInitializer.
00078 return;
00079 }
00080 throw;
00081 }
00082 }
00083 }
|
|
|
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 67 of file PI_ORBInitializer.h. Referenced by post_init(). |
1.3.6