TAO_PI_ORBInitializer Class Reference

PortableServer ORB initializer. More...

#include <PI_ORBInitializer.h>

Inheritance diagram for TAO_PI_ORBInitializer:

Inheritance graph
[legend]
Collaboration diagram for TAO_PI_ORBInitializer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

PortableInterceptor::ORBInitializer methods
The following methods are required by the PortableInterceptor::ORBInitializer interface.

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.


Detailed Description

PortableServer ORB initializer.

Definition at line 38 of file PI_ORBInitializer.h.


Member Function Documentation

void TAO_PI_ORBInitializer::post_init PortableInterceptor::ORBInitInfo_ptr  info  ) 
 

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 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL void TAO_PI_ORBInitializer::pre_init PortableInterceptor::ORBInitInfo_ptr  info  ) 
 

Definition at line 20 of file PI_ORBInitializer.cpp.

00021 {
00022 }

void TAO_PI_ORBInitializer::register_policy_factories PortableInterceptor::ORBInitInfo_ptr  info  )  [private]
 

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 }


Member Data Documentation

PortableInterceptor::PolicyFactory_var TAO_PI_ORBInitializer::policy_factory_ [private]
 

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().


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:30:16 2008 for TAO_PI by doxygen 1.3.6