diff options
Diffstat (limited to 'TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h')
-rw-r--r-- | TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h b/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h index dae90ae5981..359d9f367ac 100644 --- a/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h +++ b/TAO/CIAO/docs/templates/CIAO_Glue_Session_Template.h @@ -25,6 +25,7 @@ // that component implementations use #include "ciao/Container_Base.h" //Source in the container interface definitions #include "tao/LocalObject.h" +#include "tao/PortableServer/Key_Adapters.h" #include "ace/Active_Map_Manager_T.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -558,9 +559,12 @@ namespace CIAO_GLUE // CIAO specific operations. // Activate the object in the container_ - [component name]_ptr - _ciao_activate_component - (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + void + _ciao_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + void + _ciao_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); protected: @@ -693,17 +697,28 @@ namespace CIAO_GLUE protected: // Helper method for factory operations. - [component name]_ptr - _ciao_create_helper (::Components::EnterpriseComponent_ptr c - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); + [component name]_ptr + _ciao_activate_component (CCM_[component name]_ptr exe + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + void + _ciao_passivate_component ([component name]_ptr comp + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); // My Executor. CCM_[home name]_var executor_; // My Container CIAO::Session_Container *container_; + + // Components this home manages. + ACE_Hash_Map_Manager_Ex <PortableServer::ObjectId, + [component name]_Servant*, + TAO_ObjectId_Hash, + ACE_Equal_To<PortableServer::ObjectId>, + ACE_SYNCH_MUTEX> component_map_; }; extern "C" [SERVANT]_Export ::PortableServer::Servant |