diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-10 16:35:46 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-10 16:35:46 +0000 |
commit | 126ea65ba8cda15344842b76bd983bedbff10741 (patch) | |
tree | c560b4af06ce196b0a39f46a97a5d3c3ec30c112 /TAO | |
parent | 7331661ab9143ac7b3937b227a21460c5acdef8d (diff) | |
download | ATCD-126ea65ba8cda15344842b76bd983bedbff10741.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.cpp | 42 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.h | 96 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h | 52 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp | 129 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Container.h | 90 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Container.inl | 10 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.cpp | 44 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.h | 65 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.cpp | 252 | ||||
-rw-r--r-- | TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.h | 119 |
10 files changed, 0 insertions, 899 deletions
diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.cpp b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.cpp deleted file mode 100644 index 4229a199d47..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "Dynamic_Component_Activator.h" -#include "CIAO_common.h" -#include "ace/Log_Msg.h" -#include "ace/OS_NS_string.h" - -ACE_RCSID (ciao, - Dynamic_Component_Activator, - "$Id$") - -namespace CIAO -{ - Dynamic_Component_Activator::Dynamic_Component_Activator (CORBA::ORB_ptr o) - : orb_ (CORBA::ORB::_duplicate (o)) - { - } - - Dynamic_Component_Activator::~Dynamic_Component_Activator (void) - { - } - - PortableServer::Servant - Dynamic_Component_Activator::incarnate (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::ForwardRequest)) - { - } - - void - Dynamic_Component_Activator::etherealize (const PortableServer::ObjectId &, - PortableServer::POA_ptr , - PortableServer::Servant , - CORBA::Boolean , - CORBA::Boolean - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - /// Need to investigate what needs to be handled here.. - } - -} diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.h b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.h deleted file mode 100644 index e2a67d78eb5..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Activator.h +++ /dev/null @@ -1,96 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dynamic_Component_Activator.h - * - * $Id$ - * - * @authors Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu> - * Balachandran Natarajan <bala@dre.vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_DYNAMIC_SWAPPING_ACTIVATOR_H -#define CIAO_DYNAMIC_SWAPPING_ACTIVATOR_H -#include /**/ "ace/pre.h" - -#include "ace/Array_Base.h" -#include "ciao/CIAO_Server_Export.h" -#include "ciao/Dynamic_Component_Servant_Base.h" -#include "tao/PortableServer/Key_Adapters.h" -#include "ace/Hash_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServer/PortableServer.h" -#include "tao/LocalObject.h" - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -namespace CIAO -{ - /** - * @class Dynamic_Component_Activator - * - * @brief Activator that is registered with the POA for facet and - * consumer servants. - * - */ - class CIAO_SERVER_Export Dynamic_Component_Activator - : public virtual PortableServer::ServantActivator - , public virtual TAO_Local_RefCounted_Object - { - public: - Dynamic_Component_Activator (CORBA::ORB_ptr o); - - virtual ~Dynamic_Component_Activator (void); - - /// Template methods overridden to get callbacks. - /** - * If you would like to know the details of the following two - * methods, please PortableServer documentation. This is probably - * not the place to document what these mean. - */ - PortableServer::Servant incarnate ( - const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::ForwardRequest)); - - void etherealize (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr adapter, - PortableServer::Servant servant, - CORBA::Boolean cleanup_in_progress, - CORBA::Boolean remaining_activations - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - private: - /// Pointer to our ORB - CORBA::ORB_var orb_; - - /// Mutex that synchronizes access to the array. - ACE_SYNCH_MUTEX mutex_; - - ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - Dynamic_Component_Servant_Base *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_SYNCH_MUTEX> - servant_map_; - }; -} - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include /**/ "ace/post.h" -#endif /*CIAO_DYNAMIC_SWAPPING_ACTIVATOR_H*/ diff --git a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h b/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h deleted file mode 100644 index 7831fd3a0d0..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Dynamic_Component_Servant_Base.h +++ /dev/null @@ -1,52 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dynamic_Component_Servant_Base.h - * - * $Id$ - * - */ -//============================================================================= - - -#ifndef CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H -#define CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H - -#include /**/ "ace/pre.h" - -#include "CCM_ComponentS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServer/PortableServer.h" -#include "CIAO_Server_Export.h" - -namespace CIAO -{ - class CIAO_SERVER_Export Dynamic_Component_Servant_Base - { - public: - explicit Dynamic_Component_Servant_Base (void); - - virtual ~Dynamic_Component_Servant_Base (void); - - virtual PortableServer::Servant create (void) = 0; - - }; - - template<typename COMP_SERVANT> - class Dynamic_Component_Servant : public Dynamic_Component_Servant_Base - { - public: - PortableServer::Servant create (void) - { - return new COMP_SERVANT; - } -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_BASE_H */ diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp b/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp deleted file mode 100644 index bf8787ccca2..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Container.cpp +++ /dev/null @@ -1,129 +0,0 @@ -// $Id$ - -#include "Container_Base.h" -#include "Swapping_Container.h" -#include "ace/DLL.h" -#include "tao/Utils/PolicyList_Destroyer.h" -#include "ace/OS_NS_stdio.h" -#include "Dynamic_Component_Activator.h" - -#if !defined (__ACE_INLINE__) -# include "Swapping_Container.inl" -#endif /* __ACE_INLINE__ */ - -namespace CIAO -{ - - ACE_Atomic_Op <ACE_SYNCH_MUTEX, long> - Swapping_Container::serial_number_ (0); - - Swapping_Container::Swapping_Container (CORBA::ORB_ptr o) - : Container (o), - number_ (0) - { - } - - Swapping_Container::~Swapping_Container () - { - } - - int - Swapping_Container::init (const char *name, - const CORBA::PolicyList *more_policies - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - char buffer[MAXPATHLEN]; - - if (name == 0) - { - this->number_ = ++Swapping_Container::serial_number_; - ACE_OS::sprintf (buffer, "CIAO::Swapping_Container-%ld", - this->number_); - name = buffer; - } - - CORBA::Object_var poa_object = - this->orb_->resolve_initial_references("RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - if (CORBA::is_nil (poa_object.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - -1); - - PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - this->create_component_POA (name, - more_policies, - root_poa.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - return 0; - } - - void - Swapping_Container::create_component_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL) - { - CORBA::PolicyList policies (0); - - if (p != 0) - policies = *p; - - PortableServer::POAManager_var poa_manager = - root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - CORBA::ULong policy_length = policies.length (); - policies.length (policy_length + 1); - - policies[policy_length] = - root->create_id_assignment_policy (PortableServer::USER_ID - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policies.length (policy_length + 1); - policies[policy_length] = - root->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // Servant Retention Policy - policies.length (policy_length + 1); - policies[policy_length] = - root->create_servant_retention_policy (PortableServer::RETAIN - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->component_poa_ = - root->create_POA (name, - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_NEW_THROW_EX (this->dsa_, - Dynamic_Component_Activator (this->orb_.in ()), - CORBA::NO_MEMORY ()); - - this->component_poa_->set_servant_manager ( - this->dsa_ - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Container.h b/TAO/CIAO/DAnCE/ciao/Swapping_Container.h deleted file mode 100644 index cd44386da70..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Container.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Swapping_Container.h - * - * $Id$ - * - * Header file for CIAO's Dynamic Swapping container implementations - * - * @author Jaiganesh Balasubramanian <jai@dre.vanderbilt.edu> - * Balachandran Natarajan <bala@dre.vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_SWAPPING_CONTAINER_H -#define CIAO_SWAPPING_CONTAINER_H -#include /**/ "ace/pre.h" - -#include "tao/ORB.h" -#include "tao/PortableServer/PortableServer.h" -#include "tao/PortableServer/Servant_Base.h" -#include "ciao/CCM_ContainerC.h" -#include "ciao/Container_Base.h" -#include "ciao/Deployment_CoreC.h" -#include "ciao/Dynamic_Component_Activator.h" -#include "ciao/CIAO_Server_Export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - class CIAO_SERVER_Export Swapping_Container : public Session_Container - { - public: - - Swapping_Container (CORBA::ORB_ptr o); - - virtual ~Swapping_Container (void); - - /// Initialize the container with a name. - virtual int init (const char *name = 0, - const CORBA::PolicyList *more_policies = 0 - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - private: - - /// Create POA for the component. - void create_component_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL); - protected: - long number_; - - static ACE_Atomic_Op <ACE_SYNCH_MUTEX, long> serial_number_; - - Dynamic_Component_Activator *dsa_; - - }; -} - -// Macro for registration of an OBV factory in the generated -// servant class. Similar to the macro for TAO in -// tao/ValueType/ValueFactory.h but here we take advantage of -// the fact that we have access to the current ORB indirectly -// through the context and container. -#define CIAO_REGISTER_OBV_FACTORY(FACTORY, VALUETYPE) \ - { \ - CORBA::ValueFactory factory = new FACTORY; \ - CORBA::ORB_ptr orb = \ - this->context_->_ciao_the_Container ()->the_ORB (); \ - CORBA::ValueFactory prev_factory = \ - orb->register_value_factory ( \ - VALUETYPE::_tao_obv_static_repository_id (), \ - factory); \ - CORBA::remove_ref (prev_factory); \ - CORBA::add_ref (factory); \ - } - -#if defined (__ACE_INLINE__) -# include "Swapping_Container.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* CIAO_SWAPPING_CONTAINER_H */ diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Container.inl b/TAO/CIAO/DAnCE/ciao/Swapping_Container.inl deleted file mode 100644 index b2c00a33346..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Container.inl +++ /dev/null @@ -1,10 +0,0 @@ -// $Id$ - -ACE_INLINE CORBA::Object_ptr -CIAO::Swapping_Container::get_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - return this->the_POA ()->servant_to_reference (p - ACE_ENV_ARG_PARAMETER); -} diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.cpp b/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.cpp deleted file mode 100644 index 762cba8b7c3..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// $Id$ - -#include "Swapping_Servant_Impl_Base.h" - -namespace CIAO -{ - Swapping_Servant_Impl_Base::Swapping_Servant_Impl_Base (void) - { - ACE_ASSERT (0); - } - - Swapping_Servant_Impl_Base::Swapping_Servant_Impl_Base - (Swapping_Container * c) - : container_ (c) - { - } - - Swapping_Servant_Impl_Base::~Swapping_Servant_Impl_Base (void) - { - } - - // Operations for CCMHome interface. - - CORBA::IRObject_ptr - Swapping_Servant_Impl_Base::get_component_def ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CORBA::IRObject::_nil ()); - } - - CORBA::IRObject_ptr - Swapping_Servant_Impl_Base::get_home_def ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CORBA::IRObject::_nil ()); - } - -} diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.h b/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.h deleted file mode 100644 index 31b989d86ba..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_Base.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Swapping_Servant_Impl_Base.h - * - * $Id$ - * - */ -//============================================================================= - - -#ifndef CIAO_SWAPPING_SERVANT_IMPL_BASE_H -#define CIAO_SWAPPING_SERVANT_IMPL_BASE_H - -#include /**/ "ace/pre.h" - -#include "CCM_ComponentS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Server_Export.h" - -namespace CIAO -{ - class Swapping_Container; - - /** - * @class Swapping_Servant_Impl_Base - * - * @brief Non-template base class for Home_Servant_Impl. - * - * Holds the non-template parts of its child class - * Home_Servant_Impl. - */ - class CIAO_SERVER_Export Swapping_Servant_Impl_Base - : public virtual POA_Components::CCMHome - { - public: - explicit Swapping_Servant_Impl_Base (void); - - Swapping_Servant_Impl_Base (Swapping_Container * c); - - virtual ~Swapping_Servant_Impl_Base (void); - - // Operations for CCMHome interface. - - virtual ::CORBA::IRObject_ptr - get_component_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::CORBA::IRObject_ptr - get_home_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - Swapping_Container *container_; - }; -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_SWAPPING_SERVANT_IMPL_BASE_H */ diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.cpp b/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.cpp deleted file mode 100644 index 5b281bc29f4..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// $Id$ - -#ifndef CIAO_SWAPPING_SERVANT_IMPL_T_C -#define CIAO_SWAPPING_SERVANT_IMPL_T_C - -#include "Swapping_Servant_Impl_T.h" - -namespace CIAO -{ - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::Swapping_Servant_Impl ( - EXEC * exe, - SWapping_Container * c - ) - : Swapping_Servant_Impl_Base (c), - executor_ (EXEC::_duplicate (exe)) - { - } - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::~Swapping_Servant_Impl (void) - { - } - - // Operations for CCMHome interface. - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - void - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::remove_component ( - ::Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) - { - COMP_VAR _ciao_comp = COMP::_narrow (comp - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (_ciao_comp.in ())) - { - ACE_THROW (CORBA::INTERNAL ()); - } - - _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->_ciao_passivate_component (_ciao_comp.in () - ACE_ENV_ARG_PARAMETER); - } - - // Operations for keyless home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - Components::CCMObject_ptr - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::create_component ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) - { - return this->create (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - // Operations for implicit home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - COMP * - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::create ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) - { - if (this->executor_.in () == 0) - { - ACE_THROW_RETURN (CORBA::INTERNAL (), - COMP::_nil ()); - } - - ::Components::EnterpriseComponent_var _ciao_ec = - this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP::_nil ()); - - COMP_EXEC_VAR _ciao_comp = - COMP_EXEC::_narrow (_ciao_ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP::_nil ()); - - return this->_ciao_activate_component (_ciao_comp.in () - ACE_ENV_ARG_PARAMETER); - } - - // CIAO-specific operations. - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - COMP * - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::_ciao_activate_component ( - COMP_EXEC *exe - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - const char* obj_id = "composition_name_home_name"; - const char* repo_id = "repo_id"; - - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (obj_id); - - CORBA::Object_var objref = this->container_->generate_reference - (obj_id, repo_id, - Container::Component - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - COMP_VAR ho = COMP::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP::_nil ()); - - if (this->component_map_.bind (oid.in (), svt) == 0) - { - safe._retn (); - } - - return ho._retn (); - } - - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - void - Swapping_Servant_Impl<BASE_SKEL, - EXEC, - EXEC_VAR, - COMP, - COMP_VAR, - COMP_EXEC, - COMP_EXEC_VAR, - COMP_SVNT>::_ciao_passivate_component ( - COMP *comp - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - PortableServer::ObjectId_var oid; - this->container_->uninstall_component (comp, - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - COMP_SVNT *servant = 0; - - if (this->component_map_.unbind (oid.in (), servant) == 0) - { - PortableServer::ServantBase_var safe (servant); - - servant->_ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } -} - -#endif /* CIAO_SWAPPING_SERVANT_IMPL_T_C */ diff --git a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.h b/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.h deleted file mode 100644 index a7d936468c8..00000000000 --- a/TAO/CIAO/DAnCE/ciao/Swapping_Servant_Impl_T.h +++ /dev/null @@ -1,119 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Swapping_Servant_Impl_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated home servant class. - * - */ -//============================================================================= - - -#ifndef CIAO_SWAPPING_SERVANT_IMPL_T_H -#define CIAO_SWAPPING_SERVANT_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "Swapping_Servant_Impl_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServer/Key_Adapters.h" -#include "ace/Hash_Map_Manager_T.h" - -namespace CIAO -{ - class Swapping_Container; - - /** - * @class Swapping_Servant_Impl - * - * @brief Mixin base class for generated home servant. - * - * This class implements operations - * common to all generated home servants. - */ - template <typename BASE_SKEL, - typename EXEC, - typename EXEC_VAR, - typename COMP, - typename COMP_VAR, - typename COMP_EXEC, - typename COMP_EXEC_VAR, - typename COMP_SVNT> - class Swapping_Servant_Impl - : public virtual BASE_SKEL, - public virtual Swapping_Servant_Impl_Base, - public virtual PortableServer::RefCountServantBase - { - public: - Swapping_Servant_Impl (EXEC * exe, - Swapping_Container * c); - - virtual ~Swapping_Servant_Impl (void); - - // Operations for CCMHome interface. - - virtual void - remove_component (Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); - - // Operations for keyless home interface. - - virtual ::Components::CCMObject_ptr - create_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - - // Operations for implicit home interface. - - virtual COMP * - create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - - protected: - // CIAO-specific operations. - - COMP * - _ciao_activate_component (COMP_EXEC *exe - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - _ciao_passivate_component (COMP *comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - EXEC_VAR executor_; - - ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - COMP_SVNT *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_SYNCH_MUTEX> - component_map_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Swapping_Servant_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Swapping_Servant_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_SWAPPING_SERVANT_IMPL_T_H */ - |