#include <PortableServer_ORBInitializer.h>
Inheritance diagram for TAO_PortableServer_ORBInitializer:


Public Member Functions | |
PortableInterceptor::ORBInitializer methods | |
The following methods are required by the PortableInterceptor::ORBInitializer interface. | |
| 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 PortableServer policy factories. | |
Definition at line 30 of file PortableServer_ORBInitializer.h.
|
|
Definition at line 27 of file PortableServer_ORBInitializer.cpp. References ACE_CHECK, and ACE_ENV_ARG_PARAMETER.
00031 {
00032 this->register_policy_factories (info
00033 ACE_ENV_ARG_PARAMETER);
00034 ACE_CHECK;
00035 }
|
|
|
Definition at line 19 of file PortableServer_ORBInitializer.cpp.
00023 {
00024 }
|
|
|
Register PortableServer policy factories.
Definition at line 38 of file PortableServer_ORBInitializer.cpp. References ACE_CATCH, ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, ACE_RE_THROW, ACE_TRY, and ACE_TRY_CHECK.
00041 {
00042 // Register the PortableServer policy factories.
00043 PortableInterceptor::PolicyFactory_ptr tmp;
00044 ACE_NEW_THROW_EX (tmp,
00045 TAO_PortableServer_PolicyFactory,
00046 CORBA::NO_MEMORY (
00047 CORBA::SystemException::_tao_minor_code (
00048 TAO::VMCID,
00049 ENOMEM),
00050 CORBA::COMPLETED_NO));
00051 ACE_CHECK;
00052
00053 PortableInterceptor::PolicyFactory_var policy_factory = tmp;
00054
00055 // Bind the same policy factory to all PortableServer related policy
00056 // types since a single policy factory is used to create each of the
00057 // different types of PortableServer policies.
00058 static CORBA::PolicyType const type[] = {
00059 #if (TAO_HAS_MINIMUM_POA == 0)
00060 PortableServer::THREAD_POLICY_ID,
00061 PortableServer::IMPLICIT_ACTIVATION_POLICY_ID,
00062 PortableServer::SERVANT_RETENTION_POLICY_ID,
00063 PortableServer::REQUEST_PROCESSING_POLICY_ID,
00064 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00065 PortableServer::LIFESPAN_POLICY_ID,
00066 PortableServer::ID_UNIQUENESS_POLICY_ID,
00067 PortableServer::ID_ASSIGNMENT_POLICY_ID
00068 };
00069
00070 CORBA::PolicyType const * end =
00071 type + sizeof (type) / sizeof (type[0]);
00072
00073 for (CORBA::PolicyType const *i = type;
00074 i != end;
00075 ++i)
00076 {
00077 ACE_TRY
00078 {
00079 info->register_policy_factory (*i,
00080 policy_factory.in ()
00081 ACE_ENV_ARG_PARAMETER);
00082 ACE_TRY_CHECK;
00083 }
00084 ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
00085 {
00086 if (ex.minor () == (CORBA::OMGVMCID | 16))
00087 {
00088 // The factory is already there, it happens because the
00089 // magic initializer in PortableServer.cpp registers
00090 // with the ORB multiple times. This is an indication
00091 // that we should do no more work in this
00092 // ORBInitializer.
00093 return;
00094 }
00095 ACE_RE_THROW;
00096 }
00097 ACE_CATCHANY
00098 {
00099 // Rethrow any other exceptions...
00100 ACE_RE_THROW;
00101 }
00102 ACE_ENDTRY;
00103 ACE_CHECK;
00104 }
00105 }
|
1.3.6