diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-11-03 14:29:41 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-11-03 14:29:41 +0000 |
commit | bd601bd2565961852ff432160391faf89447cf8c (patch) | |
tree | 63aa5d58cfd83e6ce2fa90e3f324099a867f1219 | |
parent | 9c037ebcbb057c5fe996f2bedc743981b219f5b5 (diff) | |
download | ATCD-bd601bd2565961852ff432160391faf89447cf8c.tar.gz |
Tue Nov 3 13:29:31 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/Servants/Swapping/*:
Removed from the archive, swapping containers don't work and it will be a major
job to reimplement this
12 files changed, 6 insertions, 758 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 7e8b07f2dc0..ad52abcfdcb 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,9 @@ +Tue Nov 3 13:29:31 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> + + * ciao/Servants/Swapping/*: + Removed from the archive, swapping containers don't work and it will be a major + job to reimplement this + Tue Nov 3 13:27:31 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl> * ciao/Containers/Session/Session_Container.h: diff --git a/CIAO/ciao/Servants/Swapping/CIAO_SwapExec.idl b/CIAO/ciao/Servants/Swapping/CIAO_SwapExec.idl deleted file mode 100644 index b52f7db782a..00000000000 --- a/CIAO/ciao/Servants/Swapping/CIAO_SwapExec.idl +++ /dev/null @@ -1,12 +0,0 @@ -// $Id$ - -#include "ccm/CCM_EnterpriseComponent.idl" - -module CIAO -{ - local interface Swap_Exec : ::Components::EnterpriseComponent - { - Components::EnterpriseComponent incarnate (); - Components::EnterpriseComponent etherealize (); - }; -}; diff --git a/CIAO/ciao/Servants/Swapping/CIAO_Swapping_Servant_export.h b/CIAO/ciao/Servants/Swapping/CIAO_Swapping_Servant_export.h deleted file mode 100644 index 672c412e343..00000000000 --- a/CIAO/ciao/Servants/Swapping/CIAO_Swapping_Servant_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_Swapping_Servant -// ------------------------------ -#ifndef CIAO_SWAPPING_SERVANT_EXPORT_H -#define CIAO_SWAPPING_SERVANT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (CIAO_SWAPPING_SERVANT_HAS_DLL) -# define CIAO_SWAPPING_SERVANT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && CIAO_SWAPPING_SERVANT_HAS_DLL */ - -#if !defined (CIAO_SWAPPING_SERVANT_HAS_DLL) -# define CIAO_SWAPPING_SERVANT_HAS_DLL 1 -#endif /* ! CIAO_SWAPPING_SERVANT_HAS_DLL */ - -#if defined (CIAO_SWAPPING_SERVANT_HAS_DLL) && (CIAO_SWAPPING_SERVANT_HAS_DLL == 1) -# if defined (CIAO_SWAPPING_SERVANT_BUILD_DLL) -# define CIAO_Swapping_Servant_Export ACE_Proper_Export_Flag -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_SWAPPING_SERVANT_BUILD_DLL */ -# define CIAO_Swapping_Servant_Export ACE_Proper_Import_Flag -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_SWAPPING_SERVANT_BUILD_DLL */ -#else /* CIAO_SWAPPING_SERVANT_HAS_DLL == 1 */ -# define CIAO_Swapping_Servant_Export -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARATION(T) -# define CIAO_SWAPPING_SERVANT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_SWAPPING_SERVANT_HAS_DLL == 1 */ - -// Set CIAO_SWAPPING_SERVANT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_SWAPPING_SERVANT_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_SWAPPING_SERVANT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_SWAPPING_SERVANT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_SWAPPING_SERVANT_NTRACE */ - -#if (CIAO_SWAPPING_SERVANT_NTRACE == 1) -# define CIAO_SWAPPING_SERVANT_TRACE(X) -#else /* (CIAO_SWAPPING_SERVANT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define CIAO_SWAPPING_SERVANT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (CIAO_SWAPPING_SERVANT_NTRACE == 1) */ - -#endif /* CIAO_SWAPPING_SERVANT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.cpp b/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.cpp deleted file mode 100644 index 5127e369f92..00000000000 --- a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "ciao/Servants/Swapping/Dynamic_Component_Servant_Base.h" - -ACE_RCSID (ciao, - Dynamic_Component_Servant_Base, - "$Id$") - -namespace CIAO -{ - Dynamic_Component_Servant_Base::Dynamic_Component_Servant_Base (void) - : container_ (0) - { - // This constructor is here to keep MSVC happy and should - // not be used at all. This constructor should be removed - // in the future. Until then, we have the ACE_ASSERT - // below to detect a runtime call to this constructor. - ACE_ASSERT (0); - } - - Dynamic_Component_Servant_Base::Dynamic_Component_Servant_Base - (Session_Container * c) - : container_ (c) - { - } - - Dynamic_Component_Servant_Base::~Dynamic_Component_Servant_Base (void) - { - } -} diff --git a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.h b/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.h deleted file mode 100644 index 75f32819036..00000000000 --- a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_Base.h +++ /dev/null @@ -1,54 +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 "ciao/Servants/Swapping/CIAO_Swapping_Servant_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServer/PortableServer.h" - -namespace CIAO -{ - class Session_Container; - - class CIAO_Swapping_Servant_Export Dynamic_Component_Servant_Base - { - public: - /// @todo Not to be used, no idea why this should be public, have to check this - Dynamic_Component_Servant_Base (void); - - explicit Dynamic_Component_Servant_Base (Session_Container *c); - - virtual ~Dynamic_Component_Servant_Base (void); - - virtual PortableServer::Servant - create (PortableServer::ObjectId &oid) = 0; - - virtual void destroy (PortableServer::ObjectId &oid) = 0; - - virtual void update_destroy_count () = 0; - - protected: - Session_Container *container_; - }; - -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_BASE__H */ diff --git a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.cpp b/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.cpp deleted file mode 100644 index a23f8559c89..00000000000 --- a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// $Id$ - -#ifndef CIAO_DYNAMIC_COMPONENT_SERVANT_T_C -#define CIAO_DYNAMIC_COMPONENT_SERVANT_T_C - -#include "Dynamic_Component_Servant_T.h" - -namespace CIAO -{ - template <typename COMP_SVNT> - Dynamic_Component_Servant<COMP_SVNT>::Dynamic_Component_Servant ( - Components::EnterpriseComponent_ptr ec, - Components::CCMHome_ptr home, - const char* ins_name, - Home_Servant_Impl_Base *home_servant, - Session_Container *c) - : Dynamic_Component_Servant_Base (c) - , executor_ (Components::EnterpriseComponent::_duplicate (ec)) - , ins_name_ (ins_name) - , home_servant_ (home_servant) - , home_ (Components::CCMHome::_duplicate (home)) - , component_removed_ (false) - { - } - - template <typename COMP_SVNT> - void Dynamic_Component_Servant<COMP_SVNT>::update_destroy_count (void) - { - component_removed_ = true; - } - - template <typename COMP_SVNT> - Dynamic_Component_Servant<COMP_SVNT>::~Dynamic_Component_Servant (void) - { - } - - template <typename COMP_SVNT> - void Dynamic_Component_Servant<COMP_SVNT>::destroy ( - PortableServer::ObjectId &oid) - { - // @@Jai, here is a logical problem. You find a servant from a map - // having a list of servants and you turn on a bit. What is the - // granularity of the bit? Looks like its too coarse. Do you see - // what I am saying? - COMP_SVNT *servant = 0; - - if (0 == this->servant_map_.find (oid, servant)) - { - servant->remove (); - component_removed_ = true; - } - } - - template <typename COMP_SVNT> - PortableServer::Servant Dynamic_Component_Servant<COMP_SVNT>::create ( - PortableServer::ObjectId &oid) - { - CIAO::Swap_Exec_var swap_exec = - CIAO::Swap_Exec::_narrow (this->executor_.in ()); - - ::Components::EnterpriseComponent_var ciao_ec = - swap_exec->incarnate (); - - typedef typename COMP_SVNT::_exec_type exec_type; - typename COMP_SVNT::_exec_type::_var_type ciao_comp = - exec_type::_narrow (ciao_ec.in ()); - - /// @@ Jai, should you be using ACE_NEW_THROW_EX here? - COMP_SVNT *svt = new COMP_SVNT (ciao_comp.in (), - this->home_.in (), - this->ins_name_.in (), - this->home_servant_, - this->container_); - - // @@Jai, see the problem with a coarse grained stuff here. - if (component_removed_ == true) - { - component_removed_ = false; - } - - PortableServer::ServantBase_var safe (svt); - this->servant_map_.bind (oid, svt); - return safe._retn (); - } -} - -#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_T_C */ diff --git a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.h b/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.h deleted file mode 100644 index 244a51b1891..00000000000 --- a/CIAO/ciao/Servants/Swapping/Dynamic_Component_Servant_T.h +++ /dev/null @@ -1,85 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dynamic_Component_Servant_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated home servant class. - * - */ -//============================================================================= - - -#ifndef CIAO_DYNAMIC_COMPONENT_SERVANT_T_H -#define CIAO_DYNAMIC_COMPONENT_SERVANT_T_H - -#include /**/ "ace/pre.h" - -#include "Dynamic_Component_Servant_Base.h" -#include "CIAO_SwapExecC.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 -{ - template <typename COMP_SVNT> - class Dynamic_Component_Servant - : public virtual Dynamic_Component_Servant_Base - { - public: - // @@Jai, please add documentation for these methods. - Dynamic_Component_Servant (Components::EnterpriseComponent_ptr ec, - Components::CCMHome_ptr home, - const char* ins_name, - Home_Servant_Impl_Base *home_servant, - Session_Container *c); - - virtual ~Dynamic_Component_Servant (void); - - virtual PortableServer::Servant create (PortableServer::ObjectId &oid); - - virtual void destroy (PortableServer::ObjectId &oid); - - virtual void update_destroy_count (void); - - protected: - Components::EnterpriseComponent_var executor_; - - CORBA::String_var ins_name_; - - Home_Servant_Impl_Base *home_servant_; - - Components::CCMHome_var home_; - - // @@ Jai, please document why this is there. - ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - COMP_SVNT *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - TAO_SYNCH_MUTEX> - servant_map_; - - // @@ Jai, please explain what this flag means? - bool component_removed_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Dynamic_Component_Servant_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Dynamic_Component_Servant_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_DYNAMIC_COMPONENT_SERVANT_T_H */ diff --git a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.cpp b/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.cpp deleted file mode 100644 index d33d197ee7e..00000000000 --- a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// $Id$ - -#include "Swapping_Servant_Home_Impl_Base.h" - -namespace CIAO -{ - Swapping_Home_Servant_Impl_Base::Swapping_Home_Servant_Impl_Base ( - Swapping_Container * c) - : container_ (c) - { - } - - Swapping_Home_Servant_Impl_Base::~Swapping_Home_Servant_Impl_Base (void) - { - } - - // Operations for CCMHome interface. - - CORBA::IRObject_ptr - Swapping_Home_Servant_Impl_Base::get_component_def (void) - { - throw CORBA::NO_IMPLEMENT (); - } - - CORBA::IRObject_ptr - Swapping_Home_Servant_Impl_Base::get_home_def (void) - { - throw CORBA::NO_IMPLEMENT (); - } - -} diff --git a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.h b/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.h deleted file mode 100644 index 749eefe4ce7..00000000000 --- a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_Base.h +++ /dev/null @@ -1,63 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Swapping_Servant_Home_Impl_Base.h - * - * $Id$ - * - */ -//============================================================================= - -#ifndef CIAO_SWAPPING_SERVANT_HOME_IMPL_BASE_H -#define CIAO_SWAPPING_SERVANT_HOME_IMPL_BASE_H - -#include /**/ "ace/pre.h" - -#include "ciao/Servants/Swapping/CIAO_Swapping_Servant_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CCM_HomeS.h" - -namespace CIAO -{ - class Swapping_Container; - - /** - * @class Swapping_Home_Servant_Impl_Base - * - */ - // @@ Jai, why are you inheriting from "home" here? What is the - // point? - // @@ JAI, probably my class naming convention was the problem. - // This is a home implementation and that is why inheriting from - // "home". - // - class CIAO_Swapping_Servant_Export Swapping_Home_Servant_Impl_Base - : public virtual POA_Components::CCMHome - { - public: - Swapping_Home_Servant_Impl_Base (Swapping_Container * c); - - virtual ~Swapping_Home_Servant_Impl_Base (void); - - // Operations for CCMHome interface. - virtual ::CORBA::IRObject_ptr get_component_def (void); - - virtual ::CORBA::IRObject_ptr get_home_def (void); - - protected: - Swapping_Container *container_; - - private: - /// Not to be used - Swapping_Home_Servant_Impl_Base (void); - }; -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_SWAPPING_SERVANT_HOME_IMPL_BASE_H */ diff --git a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.cpp b/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.cpp deleted file mode 100644 index fbc804ca1aa..00000000000 --- a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.cpp +++ /dev/null @@ -1,213 +0,0 @@ -// $Id$ - -#ifndef CIAO_SWAPPING_SERVANT_IMPL_T_C -#define CIAO_SWAPPING_SERVANT_IMPL_T_C - -#include "ciao/Swapping_Servant_Home_Impl_T.h" -#include "ciao/Dynamic_Component_Servant_T.h" - -namespace CIAO -{ - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::Swapping_Home_Servant_Impl ( - typename EXEC::_ptr_type exe, - Session_Container * c, - const char* ins_name, - const char* obj_id, - const char* repo_id) - : Home_Servant_Impl_Base (c), - executor_ (EXEC::_duplicate (exe)), - ins_name_ (ins_name), - obj_id_ (obj_id), - repo_id_ (repo_id) - { - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::~Swapping_Home_Servant_Impl () - { - const DYNAMIC_SERVANT_MAP_ITERATOR end = - this->dynamic_servant_map_.end (); - - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (this->obj_id_); - - try - { - this->container_->delete_servant_from_map (oid); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("~Swapping_Home_Servant_Impl\t\n"); - } - - for (DYNAMIC_SERVANT_MAP_ITERATOR iter = - this->dynamic_servant_map_.begin (); - iter != end; ++iter) - { - (*iter).int_id_->destroy (oid); - } - } - - // Operations for CCMHome interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::remove_component ( - ::Components::CCMObject_ptr - ) - { - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (this->obj_id_); - - Dynamic_Component_Servant_Base *servant = 0; - - if (this->dynamic_servant_map_.find (oid.in (), servant) == 0) - { - servant->destroy (oid); - } - } - - // Operations for keyless home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Components::CCMObject_ptr - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::create_component ( - ) - { - return this->create (); - } - - // Operations for implicit home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - typename COMP_SVNT::_stub_ptr_type - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::create ( - ) - { - if (this->executor_.in () == 0) - { - throw CORBA::INTERNAL (); - } - - - ::Components::EnterpriseComponent_var _ciao_ec = - this->executor_->create (); - - return this->_ciao_activate_component (_ciao_ec.in ()); - } - - // CIAO-specific operations. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - typename COMP_SVNT::_stub_ptr_type - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::_ciao_activate_component ( - ::Components::EnterpriseComponent_ptr ec - ) - { - CORBA::Object_var hobj = - this->container_->get_home_objref (this); - - Components::CCMHome_var home = - Components::CCMHome::_narrow (hobj.in ()); - - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (this->obj_id_); - - CORBA::Object_var objref = - this->container_->generate_reference ( - this->obj_id_, - this->repo_id_, - Container::Component); - - Dynamic_Component_Servant_Base *svt = - new Dynamic_Component_Servant<COMP_SVNT> (ec, - home.in (), - this->ins_name_, - this, - this->container_); - - this->container_->add_servant_to_map (oid, svt); - - this->dynamic_servant_map_.bind (oid.in (), svt); - - typedef typename COMP_SVNT::_stub_type stub_type; - typename COMP_SVNT::_stub_var_type ho = - stub_type::_narrow (objref.in ()); - - return ho._retn (); - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::update_component_map ( - PortableServer::ObjectId &oid) - { - Dynamic_Component_Servant_Base *servant = 0; - - if (this->dynamic_servant_map_.find (oid, servant) == 0) - { - servant->update_destroy_count (); - this->dynamic_servant_map_.unbind (oid); - } - - return; - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::_ciao_passivate_component ( - typename COMP_SVNT::_stub_ptr_type comp - ) - { - PortableServer::ObjectId_var oid; - - this->container_->uninstall_component (comp, - oid.out ()); - - COMP_SVNT *servant = 0; - - if (this->component_map_.find (oid.in (), servant) == 0) - { - PortableServer::ServantBase_var safe (servant); - - servant->ciao_passivate (); - - this->component_map_.unbind (oid.in ()); - } - } -} - -#endif /* CIAO_SWAPPING_SERVANT_IMPL_T_C */ diff --git a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.h b/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.h deleted file mode 100644 index e6c59a6f37d..00000000000 --- a/CIAO/ciao/Servants/Swapping/Swapping_Servant_Home_Impl_T.h +++ /dev/null @@ -1,121 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Swapping_Servant_Home_Impl_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated home servant class. - * - */ -//============================================================================= - - -#ifndef CIAO_SWAPPING_SERVANT_HOME_IMPL_T_H -#define CIAO_SWAPPING_SERVANT_HOME_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "ciao/Home_Servant_Impl_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/Dynamic_Component_Servant_Base.h" - -#include "tao/PortableServer/Key_Adapters.h" - -#include "ace/Hash_Map_Manager_T.h" - -namespace CIAO -{ - class Session_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 COMP_SVNT> - class Swapping_Home_Servant_Impl - : public virtual BASE_SKEL, - public virtual Home_Servant_Impl_Base - { - public: - Swapping_Home_Servant_Impl (typename EXEC::_ptr_type exe, - Session_Container * c, - const char* ins_name, - const char* obj_id, - const char* repo_id); - - virtual ~Swapping_Home_Servant_Impl (void); - - // Operations for CCMHome interface. - - virtual void - remove_component (Components::CCMObject_ptr comp); - - // Operations for keyless home interface. - - virtual ::Components::CCMObject_ptr create_component (); - - // Operations for implicit home interface. - - virtual typename COMP_SVNT::_stub_ptr_type create (); - - virtual void - update_component_map (PortableServer::ObjectId &oid); - - protected: - // CIAO-specific operations. - - typename COMP_SVNT::_stub_ptr_type - _ciao_activate_component (::Components::EnterpriseComponent_ptr ec); - - void - _ciao_passivate_component (typename COMP_SVNT::_stub_ptr_type comp); - - protected: - typename EXEC::_var_type executor_; - - ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - COMP_SVNT *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - TAO_SYNCH_MUTEX> - component_map_; - - typedef ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - Dynamic_Component_Servant_Base *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - TAO_SYNCH_MUTEX> DYNAMIC_SERVANT_MAP; - - typedef DYNAMIC_SERVANT_MAP::iterator DYNAMIC_SERVANT_MAP_ITERATOR; - DYNAMIC_SERVANT_MAP dynamic_servant_map_; - - const char* ins_name_; - const char* obj_id_; - const char* repo_id_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Swapping_Servant_Home_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Swapping_Servant_Home_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_SWAPPING_SERVANT_HOME_IMPL_T_H */ diff --git a/CIAO/ciao/Servants/Swapping/Swapping_Servants.mpc b/CIAO/ciao/Servants/Swapping/Swapping_Servants.mpc deleted file mode 100644 index 0815af50445..00000000000 --- a/CIAO/ciao/Servants/Swapping/Swapping_Servants.mpc +++ /dev/null @@ -1,6 +0,0 @@ -// $Id$ - -project(CIAO_Swapping_Servants) : ciao_lib, ciao_container_base, utils, \ - ccm_componentserver_stub, ciao_servant_activator, ciao_session_container { - dynamicflags = CIAO_SWAPPING_SERVANT_BUILD_DLL -} |