diff options
Diffstat (limited to 'TAO/tao/PortableServer')
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 1c55ffc0465..32c19d9acc4 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -633,6 +633,10 @@ TAO_Object_Adapter::open (ACE_ENV_SINGLE_ARG_DECL) CORBA::COMPLETED_NO)); ACE_CHECK; + // Keep reference of POAManager in TAO_Object_Adapter so the POAManager + // object is detructed after RootPOA is destructed. + the_poa_manager_ = poa_manager; + #endif // This makes sure that the default resources are open when the Root @@ -675,11 +679,7 @@ TAO_Object_Adapter::open (ACE_ENV_SINGLE_ARG_DECL) TAO_Root_POA::String root_poa_name (TAO_DEFAULT_ROOTPOA_NAME); this->root_ = this->servant_dispatcher_->create_Root_POA (root_poa_name, -#if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) poa_manager.in (), -#else - PortableServer::POAManager::_duplicate (poa_manager.in ()), -#endif policies, this->lock (), this->thread_lock (), diff --git a/TAO/tao/PortableServer/Object_Adapter.h b/TAO/tao/PortableServer/Object_Adapter.h index e70ac6edeb9..ab254804d9a 100644 --- a/TAO/tao/PortableServer/Object_Adapter.h +++ b/TAO/tao/PortableServer/Object_Adapter.h @@ -26,6 +26,7 @@ #include "tao/PortableServer/Servant_Location.h" #include "tao/PortableServer/Default_Policy_Validator.h" #include "tao/PortableServer/POA_Policy_Set.h" +#include "tao/PortableServer/POAManagerC.h" #include "tao/Adapter.h" #include "tao/Adapter_Factory.h" @@ -497,6 +498,9 @@ private: #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) /// The POAManager factory. TAO_POAManager_Factory *poa_manager_factory_; +#else + /// The POAManager object reference. + PortableServer::POAManager_var the_poa_manager_; #endif /// The default validator and the beginning of the chain of |