diff options
Diffstat (limited to 'CIAO/ciao')
111 files changed, 0 insertions, 10522 deletions
diff --git a/CIAO/ciao/CCM_Base.idl b/CIAO/ciao/CCM_Base.idl deleted file mode 100644 index 32f46191825..00000000000 --- a/CIAO/ciao/CCM_Base.idl +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -I W:/ACE_wrappers/TAO Component_Base.idl - * tao_idl -I ../.. \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Base.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#ifdef CIAO_HAS_IMPORT_KEYWORD -// import ::CORBA; -#else -#include <orb.idl> -#endif /* CIAO_HAS_IMPORT_KEYWORD */ - -#if !defined (CCM_BASE_IDL) -#define CCM_BASE_IDL - -module Components -{ - typeprefix Components "omg.org"; - - exception InvalidConnection {}; - exception AlreadyConnected {}; - exception NoConnection {}; -}; -#endif /* CCM_BASE_IDL */ diff --git a/CIAO/ciao/CCM_CCM2Context.idl b/CIAO/ciao/CCM_CCM2Context.idl deleted file mode 100644 index d0533714ad1..00000000000 --- a/CIAO/ciao/CCM_CCM2Context.idl +++ /dev/null @@ -1,47 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container_Ex.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_2CONTEXT_IDL) -#define CCM_2CONTEXT_IDL - -#include "CCM_Container.idl" -#include "CCM_HomeRegistration.idl" -#include <CosPersistentState.idl> - -// *************** Extended Container Interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - typedef CosPersistentState::CatalogBase CatalogBase; - typedef CosPersistentState::_TypeId _TypeId; - - exception PolicyMismatch {}; - exception PersistenceNotAvailable {}; - - local interface CCM2Context : CCMContext - { - HomeRegistration get_home_registration (); - - void req_passivate () - raises (PolicyMismatch); - - CatalogBase get_persistence (in _TypeId catalog_type_id) - raises (PersistenceNotAvailable); - }; - -}; -#endif /* CCM_2CONTEXT_IDL */ diff --git a/CIAO/ciao/CCM_CCMException.idl b/CIAO/ciao/CCM_CCMException.idl deleted file mode 100644 index 445e09e1d1a..00000000000 --- a/CIAO/ciao/CCM_CCMException.idl +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -#if !defined (CCM_CCMEXCEPTION_IDL) -#define CCM_CCMEXCEPTION_IDL - -module Components -{ - typeprefix Components "omg.org"; - - enum CCMExceptionReason - { - SYSTEM_ERROR, - CREATE_ERROR, - REMOVE_ERROR, - DUPLICATE_KEY, - FIND_ERROR, - OBJECT_NOT_FOUND, - NO_SUCH_ENTITY - }; - - exception CCMException - { - CCMExceptionReason reason; - }; -}; -#endif /* CCM_CCMEXCEPTION_IDL */ diff --git a/CIAO/ciao/CCM_Component.idl b/CIAO/ciao/CCM_Component.idl deleted file mode 100644 index a19ce9b4099..00000000000 --- a/CIAO/ciao/CCM_Component.idl +++ /dev/null @@ -1,22 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_COMPONENT_IDL) -#define CCM_COMPONENT_IDL - -#include "CCM_Event.idl" -#include "CCM_Home.idl" -#include "CCM_Object.idl" -#include "CCM_Enumeration.idl" - -#endif /* CCM_COMPONENT_IDL */ diff --git a/CIAO/ciao/CCM_Configurator.idl b/CIAO/ciao/CCM_Configurator.idl deleted file mode 100644 index 1c908bde6ce..00000000000 --- a/CIAO/ciao/CCM_Configurator.idl +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_CONFIGURATOR_IDL) -#define CCM_CONFIGURATOR_IDL - -#include "CCM_Event.idl" -#include "CCM_Home.idl" - -module Components -{ - typeprefix Components "omg.org"; - - exception WrongComponentType {}; - - interface CCMObject; - - interface Configurator - { - void configure (in CCMObject comp) - raises (WrongComponentType); - }; -}; -#endif /* CCM_CONFIGURATOR_IDLL */ diff --git a/CIAO/ciao/CCM_Container.idl b/CIAO/ciao/CCM_Container.idl deleted file mode 100644 index 4eb3f268da9..00000000000 --- a/CIAO/ciao/CCM_Container.idl +++ /dev/null @@ -1,71 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_CONTAINER_IDL) -#define CCM_CONTAINER_IDL - -#include "CCM_Component.idl" -#include "CCM_Context.idl" -#include "CCM_CCMException.idl" -#include "CCM_EnterpriseComponent.idl" -#include "CCM_HomeExecutorBase.idl" - -// *************** Basic Container interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - local interface SessionContext : CCMContext - { - Object get_CCM_object() - raises (IllegalState); - }; - - local interface SessionComponent : EnterpriseComponent - { - void set_session_context ( in SessionContext ctx) - raises (CCMException); - - void ccm_activate() - raises (CCMException); - - void ccm_passivate() - raises (CCMException); - - - void ccm_remove () - raises (CCMException); - - /** - * This method is invoked before ccm_activate () is called. All - * components in the assembly get this callback before the - * ccm_activate () is called. - * @note CIAO specific - */ - void ciao_preactivate () - raises (CCMException); - - /** - * This method is invoked after ccm_activate () is called. All - * components in the assembly get this callback after the - * ccm_activate () is called. - * @note CIAO specific - */ - void ciao_postactivate () - raises (CCMException); - }; -}; -#endif /* CCM_CONTAINER_IDL */ diff --git a/CIAO/ciao/CCM_Container_Ex.idl b/CIAO/ciao/CCM_Container_Ex.idl deleted file mode 100644 index def43f81a46..00000000000 --- a/CIAO/ciao/CCM_Container_Ex.idl +++ /dev/null @@ -1,128 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container_Ex.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_CONTAINER_EX_IDL) -#define CCM_CONTAINER_EX_IDL - -#include "CCM_Container.idl" -#include "CCM_Session2Context.idl" -#include "CCM_EntityContext.idl" -#include <CosPersistentState.idl> - -// *************** Extended Container Interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - typedef short SegmentId; - const SegmentId COMPONENT_SEGMENT = 0; - - typedef short FacetId; - const FacetId COMPONENT_FACET = 0; - - typedef sequence<octet> IdData; - typedef CosPersistentState::Pid PersistentId; - - typedef short StateIdType; - const StateIdType PERSISTENT_ID = 0; - - exception InvalidStateIdData {}; - - abstract valuetype StateIdValue - { - StateIdType get_sid_type(); - IdData get_sid_data(); - }; - - local interface StateIdFactory - { - StateIdValue create (in IdData data) - raises (InvalidStateIdData); - }; - - valuetype PersistentIdValue : StateIdValue - { - private PersistentId pid; - - PersistentId get_pid(); - factory init (in PersistentId pid); - }; - - valuetype SegmentDescr - { - private StateIdValue sid; - private SegmentId seg; - - StateIdValue get_sid(); - SegmentId get_seg_id(); - factory init (in StateIdValue sid, - in SegmentId seg); - }; - - typedef sequence<SegmentDescr> SegmentDescrSeq; - - local interface ComponentId - { - FacetId get_target_facet(); - - SegmentId get_target_segment(); - - StateIdValue get_target_state_id (in StateIdFactory sid_factory) - raises (InvalidStateIdData); - - StateIdValue get_segment_state_id (in SegmentId seg, - in StateIdFactory sid_factory) - raises (InvalidStateIdData); - - ComponentId create_with_new_target (in FacetId new_target_facet, - in SegmentId new_target_segment); - - SegmentDescrSeq get_segment_descrs (in StateIdFactory sid_factory) - raises (InvalidStateIdData); - }; - - local interface Entity2Context : EntityContext, CCM2Context - { - ComponentId get_component_id () - raises (IllegalState); - - ComponentId create_component_id (in FacetId target_facet, - in SegmentId target_segment, - in SegmentDescrSeq seq_descrs); - - ComponentId create_monolithic_component_id (in FacetId target_facet, - in StateIdValue sid); - - Object create_ref_from_cid (in CORBA::RepositoryId repid, - in ComponentId cid); - - ComponentId get_cid_from_ref (in Object objref) - raises (BadComponentReference); - }; - - local interface ExecutorLocator : EnterpriseComponent - { - Object obtain_executor (in string name) - raises (CCMException); - - void release_executor (in Object exc) - raises (CCMException); - - void configuration_complete() - raises (InvalidConfiguration); - }; -}; -#endif /* CCM_CONTAINER_EX_IDL */ diff --git a/CIAO/ciao/CCM_Context.idl b/CIAO/ciao/CCM_Context.idl deleted file mode 100644 index 7379c20b918..00000000000 --- a/CIAO/ciao/CCM_Context.idl +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_CONTEXT_IDL) -#define CCM_CONTEXT_IDL - -#include "orbsvcs/SecurityLevel2.idl" -#include "CCM_Transaction.idl" -#include "CCM_Home.idl" - -// *************** Basic Container interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - typedef SecurityLevel2::Credentials Principal; - - exception IllegalState {}; - - local interface CCMContext - { - Principal get_caller_principal(); - - CCMHome get_CCM_home(); - - boolean get_rollback_only() - raises (IllegalState); - - Transaction::UserTransaction get_user_transaction() - raises (IllegalState); - - boolean is_caller_in_role (in string role); - - void set_rollback_only() - raises (IllegalState); - }; -}; -#endif /* CCM_CONTEXT_IDL */ diff --git a/CIAO/ciao/CCM_Cookie.idl b/CIAO/ciao/CCM_Cookie.idl deleted file mode 100644 index f815d9f1ef9..00000000000 --- a/CIAO/ciao/CCM_Cookie.idl +++ /dev/null @@ -1,29 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -I W:/ACE_wrappers/TAO Component_Base.idl - * tao_idl -I ../.. \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Base.idl - */ - -#if !defined (CCM_COOKIE_IDL) -#define CCM_COOKIE_IDL - -#include "tao/OctetSeq.pidl" - -module Components -{ - typeprefix Components "omg.org"; - - valuetype Cookie - { - private CORBA::OctetSeq cookieValue; - }; -}; -#endif /* CCM_COOKIE_IDL */ diff --git a/CIAO/ciao/CCM_Core.mpc b/CIAO/ciao/CCM_Core.mpc deleted file mode 100644 index b8cda16612b..00000000000 --- a/CIAO/ciao/CCM_Core.mpc +++ /dev/null @@ -1,276 +0,0 @@ -// $Id$ - -project (CIAO_DnC_Client) : taolib_with_idl, valuetype, ifr_client { - sharedname = CIAO_DnC_Client - idlflags += -Wb,stub_export_include=CIAO_Client_Export.h - idlflags += -Wb,stub_export_macro=CIAO_CLIENT_Export - idlflags += -Wb,skel_export_include=CIAO_Container_Export.h - idlflags += -Wb,skel_export_macro=CIAO_CONTAINER_Export - - // This is necessary for MPC to pull in rules.ciao.GNU - includes += $(CIAO_ROOT)/DAnCE - - dynamicflags = CIAO_CLIENT_BUILD_DLL - - IDL_Files { - idlflags += -SS -Sci - CCM_Base.idl - CCM_Component.idl - } - - IDL_Files { - idlflags += -SS - CCM_Cookie.idl - CCM_Enumeration.idl - } - - IDL_Files { - CCM_HomeConfigurator.idl - CCM_StandardConfigurator.idl - CCM_KeylessCCMHome.idl - CCM_Home.idl - CCM_Object.idl - CCM_HomeFinder.idl - CCM_Navigation.idl - CCM_Receptacle.idl - Components.idl - } - - IDL_Files { - CCM_Configurator.idl - CCM_Event.idl - } - - Source_Files { - CCM_BaseC.cpp - CCM_EventC.cpp - CCM_ComponentC.cpp - CCM_EnumerationC.cpp - CCM_HomeC.cpp - CCM_ConfiguratorC.cpp - CCM_HomeConfiguratorC.cpp - CCM_KeylessCCMHomeC.cpp - CCM_StandardConfiguratorC.cpp - CCM_HomeFinderC.cpp - CCM_NavigationC.cpp - CCM_ReceptacleC.cpp - CCM_CookieC.cpp - CCM_ObjectC.cpp - Client_init.cpp - ComponentsC.cpp - } - - Header_Files { - CIAO_Client_Export.h - CIAO_common.h - } -} - -project (CIAO_DnC_Container) : orbsvcslib, portableserver, security, valuetype, ifr_client, codecfactory, pi, ciao_client_dnc { - sharedname = CIAO_DnC_Container - idlflags += -Wb,export_include=CIAO_Container_Export.h - idlflags += -Wb,export_macro=CIAO_CONTAINER_Export - dynamicflags = CIAO_CONTAINER_BUILD_DLL - - // This is necessary for MPC to pull in rules.ciao.GNU - includes += $(CIAO_ROOT)/DAnCE - - IDL_Files { - idlflags += -SS -Sci - CCM_Context.idl - CCM_CCMException.idl - CCM_EntityComponent.idl - CCM_EntityContext.idl - SwapExec.idl - UpgradeableContext.idl - } - - IDL_Files { - idlflags += -SS - CCM_CCM2Context.idl - CCM_ProxyHomeRegistration.idl - CCM_Session2Context.idl - CCM_Transaction.idl - CosPersistentState.idl - CCM_Container.idl - CCM_Container_Ex.idl - CCM_EnterpriseComponent.idl - CCM_SessionSynchronization.idl - CCM_HomeRegistration.idl - CCM_HomeExecutorBase.idl - } - - Source_Files { - CCM_TransactionC.cpp - CosPersistentStateC.cpp - CCM_ContainerC.cpp - CCM_EnterpriseComponentC.cpp - CCM_SessionSynchronizationC.cpp - CCM_CCMExceptionC.cpp - CCM_ContextC.cpp - CCM_Container_ExC.cpp - CCM_ProxyHomeRegistrationC.cpp - CCM_Session2ContextC.cpp - CCM_CCM2ContextC.cpp - CCM_HomeRegistrationC.cpp - CCM_HomeExecutorBaseC.cpp - CCM_EntityContextC.cpp - CCM_EntityComponentC.cpp - CCM_EventS.cpp - CCM_ConfiguratorS.cpp - CCM_HomeConfiguratorS.cpp - CCM_KeylessCCMHomeS.cpp - CCM_StandardConfiguratorS.cpp - CCM_HomeS.cpp - CCM_ObjectS.cpp - CCM_HomeFinderS.cpp - CCM_NavigationS.cpp - CCM_ReceptacleS.cpp - SwapExecC.cpp - UpgradeableContextC.cpp - Cookies.cpp - ComponentsS.cpp - } - -} - -// Valuetype library must be linked for this project. -// Please don't remove. -project(Deployment_stub) : taolib_with_idl, valuetype, ifr_client, ciao_events_base_dnc, ciao_client_dnc { - sharedname = CIAO_Deployment_stub - - // This is necessary for MPC to pull in rules.ciao.GNU - includes += $(CIAO_ROOT)/DAnCE $(CIAO_ROOT) - - idlflags += -Wb,stub_export_macro=Deployment_stub_Export - idlflags += -Wb,stub_export_include=Deployment_stub_export.h - idlflags += -Wb,skel_export_macro=Deployment_svnt_Export - idlflags += -Wb,skel_export_include=Deployment_svnt_export.h - - dynamicflags = DEPLOYMENT_STUB_BUILD_DLL - - IDL_Files { - idlflags += -SS -Sci - Packaging_Data.idl - Target_Data.idl - } - - IDL_Files { - idlflags += -SS - Deployment_Base.idl - Deployment_Connection.idl - Deployment_Data.idl - Deployment_TargetData.idl - ServerResources.idl - Deployment_Events.idl - } - - IDL_Files { - TargetManager.idl - NodeApplication_CallBack.idl - Deployment_Core.idl - Deployment_Application.idl - Deployment.idl - NodeManager.idl - NodeApplicationManager.idl - DomainApplicationManager.idl - ExecutionManager.idl - RepositoryManager.idl - } - - Source_Files { - Deployment_CoreC.cpp - Deployment_BaseC.cpp - Deployment_ConnectionC.cpp - Deployment_DataC.cpp - Deployment_TargetDataC.cpp - Deployment_ApplicationC.cpp - Packaging_DataC.cpp - Target_DataC.cpp - DeploymentC.cpp - TargetManagerC.cpp - NodeManagerC.cpp - NodeApplicationManagerC.cpp - DomainApplicationManagerC.cpp - ExecutionManagerC.cpp - RepositoryManagerC.cpp - NodeApplication_CallBackC.cpp - ServerResourcesC.cpp - Deployment_EventsC.cpp - } -} - -// CIAO_DnC_Client library must be linked for this project. -// Please don't remove. -project(Deployment_svnt) : taolib_with_idl, portableserver, valuetype, ifr_client, ciao_deployment_stub, ciao_events_dnc, ciao_client_dnc { - sharedname = CIAO_Deployment_svnt - dynamicflags = DEPLOYMENT_SVNT_BUILD_DLL - idlflags += -Wb,stub_export_macro=Deployment_stub_Export - idlflags += -Wb,stub_export_include=Deployment_stub_export.h - idlflags += -Wb,skel_export_macro=Deployment_svnt_Export - idlflags += -Wb,skel_export_include=Deployment_svnt_export.h - - // This is necessary for MPC to pull in rules.ciao.GNU - includes += $(CIAO_ROOT)/DAnCE $(CIAO_ROOT) - - IDL_Files { - } - - Source_Files { - Deployment_CoreS.cpp - Deployment_ApplicationS.cpp - DeploymentS.cpp - RepositoryManagerS.cpp - NodeManagerS.cpp - NodeApplicationManagerS.cpp - DomainApplicationManagerS.cpp - ExecutionManagerS.cpp - NodeApp_CB_Impl.cpp - TargetManagerS.cpp - NodeApplication_CallBackS.cpp - } - -} - -project (CIAO_DnC_Server) : orbsvcslib, portableserver, valuetype, naming, ifr_client, utils, security, ciao_container_dnc, ciao_client_dnc, ciao_deployment_svnt { - includes += $(CIAO_ROOT)/ciao - includes += $(CIAO_ROOT) - sharedname = CIAO_DnC_Server - idlflags += -Wb,export_include=CIAO_Server_Export.h -Wb,export_macro=CIAO_SERVER_Export - dynamicflags = CIAO_SERVER_BUILD_DLL - - IDL_Files { - - } - - Source_Files { - Container_Base.cpp - Swapping_Container.cpp - Context_Impl_Base.cpp - Home_Servant_Impl_Base.cpp - Servant_Impl_Base.cpp - Swapping_Servant_Home_Impl_Base.cpp - Server_init.cpp - Servant_Activator.cpp - Dynamic_Component_Activator.cpp - Dynamic_Component_Servant_Base.cpp - Port_Activator.cpp - StandardConfigurator_Impl.cpp - } - - Header_Files { - CIAO_Server_Export.h - CIAO_common.h - } - - Template_Files { - Context_Impl_T.cpp - Upgradeable_Context_Impl_T.cpp - Home_Servant_Impl_T.cpp - Swapping_Servant_Home_Impl_T.cpp - Dynamic_Component_Servant_T.cpp - Servant_Impl_T.cpp - Servant_Impl_Utils_T.cpp - Servant_Activator_T.cpp - } -} diff --git a/CIAO/ciao/CCM_EnterpriseComponent.idl b/CIAO/ciao/CCM_EnterpriseComponent.idl deleted file mode 100644 index b3f3d1b9432..00000000000 --- a/CIAO/ciao/CCM_EnterpriseComponent.idl +++ /dev/null @@ -1,25 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_ENTERPRISECOMPONENT_IDL) -#define CCM_ENTERPRISECOMPONENT_IDL - -module Components -{ - typeprefix Components "omg.org"; - - local interface EnterpriseComponent {}; -}; -#endif /* CCM_CONTAINER_IDL */ diff --git a/CIAO/ciao/CCM_EntityComponent.idl b/CIAO/ciao/CCM_EntityComponent.idl deleted file mode 100644 index 28342b37b84..00000000000 --- a/CIAO/ciao/CCM_EntityComponent.idl +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_ENTITYCOMPONENT_IDL) -#define CCM_ENTITYCOMPONENT_IDL - -#include "CCM_CCMException.idl" -#include "CCM_EnterpriseComponent.idl" -#include "CCM_EntityContext.idl" - -module Components -{ - typeprefix Components "omg.org"; - - local interface EntityComponent : EnterpriseComponent - { - void set_entity_context (in EntityContext ctx) - raises (CCMException); - - void unset_entity_context () - raises (CCMException); - - void ccm_activate () - raises (CCMException); - - void ccm_load () - raises (CCMException); - - void ccm_store () - raises (CCMException); - - void ccm_passivate () - raises (CCMException); - - void ccm_remove () - raises (CCMException); - }; -}; -#endif /* CCM_ENTITYCOMPONENT_IDL */ diff --git a/CIAO/ciao/CCM_EntityContext.idl b/CIAO/ciao/CCM_EntityContext.idl deleted file mode 100644 index 87b199c74c1..00000000000 --- a/CIAO/ciao/CCM_EntityContext.idl +++ /dev/null @@ -1,35 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_ENTITYCONTEXT_IDL) -#define CCM_ENTITYCONTEXT_IDL - -#include "CCM_Context.idl" -#include "CCM_Object.idl" - -module Components -{ - typeprefix Components "omg.org"; - - local interface EntityContext : CCMContext - { - Object get_CCM_object () - raises (IllegalState); - - PrimaryKeyBase get_primary_key () - raises (IllegalState); - }; -}; -#endif /* CCM_ENTITYCONTEXT_IDL */ diff --git a/CIAO/ciao/CCM_Enumeration.idl b/CIAO/ciao/CCM_Enumeration.idl deleted file mode 100644 index cec9e60da19..00000000000 --- a/CIAO/ciao/CCM_Enumeration.idl +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_ENUMERATION_IDL) -#define CCM_ENUMERATION_IDL - -#include "CCM_Object.idl" - -module Components -{ - typeprefix Components "omg.org"; - - /// @@ Enumeration and DefaultEnumeration are only for EJB to CCM - /// mapping? At any rate, we should be able to skip them for now. - abstract valuetype Enumeration - { - boolean has_more_elements(); - CCMObject next_element(); - }; - - typedef sequence<CCMObject> CCMObjectSeq; - - valuetype DefaultEnumeration : Enumeration - { - private CCMObjectSeq objects; - }; -}; -#endif /* CCM_ENUMERATION_IDL */ diff --git a/CIAO/ciao/CCM_Event.idl b/CIAO/ciao/CCM_Event.idl deleted file mode 100644 index b149e0bbd28..00000000000 --- a/CIAO/ciao/CCM_Event.idl +++ /dev/null @@ -1,118 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Event.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_EVENT_IDL) -#define CCM_EVENT_IDL - -#include "CCM_Base.idl" -#include "CCM_Navigation.idl" -#include "CCM_Receptacle.idl" -#include "CCM_Cookie.idl" -#include "tao/orb_types.pidl" - -module Components -{ - typeprefix Components "omg.org"; - - abstract valuetype EventBase {}; - - exception BadEventType - { - CORBA::RepositoryId expected_event_type; - }; - - interface EventConsumerBase - { - void push_event (in EventBase evt) raises (BadEventType); - - /// CIAO-specific operation to help support the capability - /// to subscribe to eventtypes more derived than the type - /// consumed. - boolean ciao_is_substitutable (in string event_repo_id); - }; - - valuetype ConsumerDescription : PortDescription - { - public EventConsumerBase consumer; - }; - typedef sequence<ConsumerDescription> ConsumerDescriptions; - - valuetype EmitterDescription : PortDescription - { - public EventConsumerBase consumer; - }; - typedef sequence<EmitterDescription> EmitterDescriptions; - - valuetype SubscriberDescription - { - public Cookie ck; - public EventConsumerBase consumer; - }; - typedef sequence<SubscriberDescription> SubscriberDescriptions; - - valuetype PublisherDescription : PortDescription - { - public SubscriberDescriptions consumer; - }; - typedef sequence<PublisherDescription> PublisherDescriptions; - - interface Events - { - EventConsumerBase get_consumer (in FeatureName sink_name) - raises (InvalidName); - - /** - * @todo Mismatch with 06-04-01, AlreadyConnected is not listed in the - * spec with this operation - */ - Cookie subscribe (in FeatureName publisher_name, - in EventConsumerBase subscriber) - raises (InvalidName, - AlreadyConnected, - InvalidConnection, - ExceededConnectionLimit); - - EventConsumerBase unsubscribe (in FeatureName publisher_name, - in Cookie ck) - raises (InvalidName, - InvalidConnection); - - void connect_consumer (in FeatureName emitter_name, - in EventConsumerBase consumer) - raises (InvalidName, - AlreadyConnected, - InvalidConnection); - - EventConsumerBase disconnect_consumer (in FeatureName source_name) - raises (InvalidName, - NoConnection); - - ConsumerDescriptions get_all_consumers (); - - ConsumerDescriptions get_named_consumers (in NameList names) - raises (InvalidName); - - EmitterDescriptions get_all_emitters (); - - EmitterDescriptions get_named_emitters (in NameList names) - raises (InvalidName); - - PublisherDescriptions get_all_publishers (); - - PublisherDescriptions get_named_publishers (in NameList names) - raises (InvalidName); - }; -}; -#endif /* CCM_EVENT_IDL */ diff --git a/CIAO/ciao/CCM_Home.idl b/CIAO/ciao/CCM_Home.idl deleted file mode 100644 index d786cdcc07c..00000000000 --- a/CIAO/ciao/CCM_Home.idl +++ /dev/null @@ -1,26 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_HOME_IDL) -#define CCM_HOME_IDL - -#include "CCM_Object.idl" -#include "tao/IFR_Client/IFR_Base.pidl" - -//module Components -//{ -// typeprefix Components "omg.org"; -// -//}; - -#endif /* CCM_HOME_IDL */ diff --git a/CIAO/ciao/CCM_HomeConfigurator.idl b/CIAO/ciao/CCM_HomeConfigurator.idl deleted file mode 100644 index d2c254ce078..00000000000 --- a/CIAO/ciao/CCM_HomeConfigurator.idl +++ /dev/null @@ -1,32 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_HOMECONFIGURATOR_IDL) -#define CCM_HOMECONFIGURATOR_IDL - -#include "CCM_Configurator.idl" -#include "CCM_StandardConfigurator.idl" - -module Components -{ - typeprefix Components "omg.org"; - - interface HomeConfiguration : CCMHome - { - void set_configurator (in Configurator cfg); - void set_configuration_values (in ConfigValues config); - void complete_component_configuration (in boolean b); - void disable_home_configuration(); - }; -}; -#endif /* CCM_HOMECONFIGURATOR_IDL */ diff --git a/CIAO/ciao/CCM_HomeExecutorBase.idl b/CIAO/ciao/CCM_HomeExecutorBase.idl deleted file mode 100644 index e1db55b9afc..00000000000 --- a/CIAO/ciao/CCM_HomeExecutorBase.idl +++ /dev/null @@ -1,27 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_HOMEEXECUTORBASE_IDL) -#define CCM_HOMEEXECUTORBASE_IDL - -module Components -{ - typeprefix Components "omg.org"; - - local interface HomeExecutorBase - { - }; -}; -#endif /* CCM_HOMEEXECUTORBASE_IDL */ diff --git a/CIAO/ciao/CCM_HomeFinder.idl b/CIAO/ciao/CCM_HomeFinder.idl deleted file mode 100644 index f5ffca44442..00000000000 --- a/CIAO/ciao/CCM_HomeFinder.idl +++ /dev/null @@ -1,39 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_HomeFinder.idl - */ - -#if !defined (CCM_HOMEFINDER_IDL) -#define CCM_HOMEFINDER_IDL - -#include "tao/orb_types.pidl" - -module Components -{ - typeprefix Components "omg.org"; - - exception HomeNotFound {}; - - interface CCMHome; - - interface HomeFinder - { - CCMHome find_home_by_component_type (in CORBA::RepositoryId comp_repid) - raises (HomeNotFound); - - CCMHome find_home_by_home_type (in CORBA::RepositoryId home_repid) - raises (HomeNotFound); - - CCMHome find_home_by_name (in string home_name) - raises (HomeNotFound); - }; -}; -#endif /* CCM_HOMEFINDER_IDL */ diff --git a/CIAO/ciao/CCM_HomeRegistration.idl b/CIAO/ciao/CCM_HomeRegistration.idl deleted file mode 100644 index f724b908337..00000000000 --- a/CIAO/ciao/CCM_HomeRegistration.idl +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container_Ex.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_HOMEREGISTRATION_IDL) -#define CCM_HOMEREGISTRATION_IDL - -#include "CCM_Home.idl" - -module Components -{ - typeprefix Components "omg.org"; - - local interface HomeRegistration - { - void register_home (in CCMHome home_ref, - in string home_name); - - void unregister_home (in CCMHome home_ref); - }; - -}; -#endif /* CCM_HOMEREGISTRATION_IDL */ diff --git a/CIAO/ciao/CCM_KeylessCCMHome.idl b/CIAO/ciao/CCM_KeylessCCMHome.idl deleted file mode 100644 index 3b27b2b8cb2..00000000000 --- a/CIAO/ciao/CCM_KeylessCCMHome.idl +++ /dev/null @@ -1,30 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_KEYLESSCCMHOME_IDL) -#define CCM_KEYLESSCCMHOME_IDL - -#include "CCM_Home.idl" - -module Components -{ - typeprefix Components "omg.org"; - - interface KeylessCCMHome - { - CCMObject create_component() - raises (CreateFailure); - }; - -}; -#endif /* CCM_KEYLESSCCMHOME_IDL */ diff --git a/CIAO/ciao/CCM_Navigation.idl b/CIAO/ciao/CCM_Navigation.idl deleted file mode 100644 index 6305d8fe3c9..00000000000 --- a/CIAO/ciao/CCM_Navigation.idl +++ /dev/null @@ -1,53 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -I W:/ACE_wrappers/TAO Component_Base.idl - * tao_idl -I ../.. \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Navigation.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_NAVIGATION_IDL) -#define CCM_NAVIGATION_IDL - -#include "tao/orb_types.pidl" - -module Components -{ - typeprefix Components "omg.org"; - - typedef string FeatureName; - typedef sequence<FeatureName> NameList; - - valuetype PortDescription - { - public FeatureName name; - public CORBA::RepositoryId type_id; - }; - - valuetype FacetDescription : PortDescription - { - public Object facet_ref; - }; - - typedef sequence<FacetDescription> FacetDescriptions; - - exception InvalidName {}; - interface Navigation - { - Object provide_facet (in FeatureName name) - raises (InvalidName); - FacetDescriptions get_all_facets(); - FacetDescriptions get_named_facets (in NameList names) - raises (InvalidName); - boolean same_component (in Object object_ref); - }; -}; -#endif /* CCM_NAVIGATION_IDL */ diff --git a/CIAO/ciao/CCM_Object.idl b/CIAO/ciao/CCM_Object.idl deleted file mode 100644 index 348ab0d758c..00000000000 --- a/CIAO/ciao/CCM_Object.idl +++ /dev/null @@ -1,129 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_OBJECT_IDL) -#define CCM_OBJECT_IDL - -#include "CCM_Event.idl" -#include "CCM_Navigation.idl" -#include "tao/IFR_Client/IFR_Base.pidl" - -module Components -{ - typeprefix Components "omg.org"; - - typedef unsigned long FailureReason; - - typedef FailureReason InvalidConfigurationReason; - const InvalidConfigurationReason UnknownConfigValueName = 0; - const InvalidConfigurationReason InvalidConfigValueType = 1; - const InvalidConfigurationReason ConfigValueRequired = 2; - const InvalidConfigurationReason ConfigValueNotExpected = 3; - - exception CreateFailure { - FailureReason reason; - }; - exception FinderFailure - { - FailureReason reason; - }; - exception RemoveFailure - { - FailureReason reason; - }; - - exception DuplicateKeyValue {}; - exception InvalidKey {}; - exception UnknownKeyValue {}; - - interface CCMObject; - - interface CCMHome - { - CORBA::IRObject get_component_def (); - CORBA::IRObject get_home_def (); - void remove_component ( in CCMObject comp) - raises (RemoveFailure); - }; - - - exception InvalidConfiguration - { - InvalidConfigurationReason reason; - FeatureName name; - }; - - abstract valuetype PrimaryKeyBase {}; - - valuetype ComponentPortDescription - { - public FacetDescriptions facets; - public ReceptacleDescriptions receptacles; - public ConsumerDescriptions consumers; - public EmitterDescriptions emitters; - public PublisherDescriptions publishers; - }; - - interface StandardConfigurator; - - exception NoKeyAvailable {}; - - interface CCMObject : Navigation, Receptacles, Events - { - CORBA::IRObject get_component_def ( ); - CCMHome get_ccm_home( ); - PrimaryKeyBase get_primary_key( ) - raises (NoKeyAvailable); - void remove() - raises (RemoveFailure); - ComponentPortDescription get_all_ports (); - - /// Factory method to return a StandardConfigurator interface. CIAO specific - StandardConfigurator get_standard_configurator ( ); - - /// CIAO specific operations to have some control on when and how - /// to activate components. - /** - * This is all from our work on ARMS where we needed to know whether - * every component has been configured, say for example to use - * logging in the assembly which could in turn be provided by a - * component. To get around all this we are adding some methods on - * this till we think of some standard way to do this. The problem - * is that the deployer should be able to call this as opposed to - * the home calling it as soon as the component is created. - * - * All these operations are called in the order mentioned, ie. the - * deployer calls ciao_preactivate () on all components, then - * ciao_activate and then ciao_postactivate (). The speciality is - * that these operations would be invoked on every target object - * before the next call is made. It is similar to the way - * portable interceptors work, trying to get everything onto the - * flow stack, but differ in the intention. - */ - void ciao_preactivate () - raises (InvalidConfiguration); - - void ciao_activate () - raises (InvalidConfiguration); - - void ciao_postactivate () - raises (InvalidConfiguration); - - void ciao_passivate () - raises (InvalidConfiguration); - - void configuration_complete () - raises (InvalidConfiguration); - }; -}; -#endif /* CCM_OBJECT_IDL */ diff --git a/CIAO/ciao/CCM_ProxyHomeRegistration.idl b/CIAO/ciao/CCM_ProxyHomeRegistration.idl deleted file mode 100644 index f15cce2a25e..00000000000 --- a/CIAO/ciao/CCM_ProxyHomeRegistration.idl +++ /dev/null @@ -1,36 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container_Ex.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_PROXYHOMEREGISTRATION_IDL) -#define CCM_PROXYHOMEREGISTRATION_IDL - -#include "CCM_HomeRegistration.idl" - -module Components -{ - typeprefix Components "omg.org"; - - exception UnknownActualHome {}; - exception ProxyHomeNotSupported {}; - - local interface ProxyHomeRegistration : HomeRegistration - { - void register_proxy_home (in CCMHome rhome, - in CCMHome ahome) - raises (UnknownActualHome, - ProxyHomeNotSupported); - }; -}; -#endif /* CCM_PROXYHOMEREGISTRATION_IDL */ diff --git a/CIAO/ciao/CCM_Receptacle.idl b/CIAO/ciao/CCM_Receptacle.idl deleted file mode 100644 index 5aafe192c73..00000000000 --- a/CIAO/ciao/CCM_Receptacle.idl +++ /dev/null @@ -1,68 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -I W:/ACE_wrappers/TAO Component_Base.idl - * tao_idl -I ../.. \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Base.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_RECEPTACLE_IDL) -#define CCM_RECEPTACLE_IDL - -#include "CCM_Base.idl" -#include "CCM_Navigation.idl" -#include "CCM_Cookie.idl" - -module Components -{ - typeprefix Components "omg.org"; - - valuetype ConnectionDescription - { - public Cookie ck; - public Object objref; - }; - typedef sequence<ConnectionDescription> ConnectionDescriptions; - - valuetype ReceptacleDescription : PortDescription - { - public boolean is_multiple; - public ConnectionDescriptions connections; - }; - typedef sequence<ReceptacleDescription> ReceptacleDescriptions; - - exception ExceededConnectionLimit {}; - exception CookieRequired {}; - - interface Receptacles - { - Cookie connect (in FeatureName name, in Object connection ) - raises (InvalidName, - InvalidConnection, - AlreadyConnected, - ExceededConnectionLimit); - - Object disconnect (in FeatureName name, in Cookie ck) - raises (InvalidName, - InvalidConnection, - CookieRequired, - NoConnection); - - ConnectionDescriptions get_connections (in FeatureName name) - raises (InvalidName); - - ReceptacleDescriptions get_all_receptacles (); - - ReceptacleDescriptions get_named_receptacles (in NameList names) - raises (InvalidName); - }; -}; -#endif /* CCM_RECEPTACLE_IDL */ diff --git a/CIAO/ciao/CCM_Session2Context.idl b/CIAO/ciao/CCM_Session2Context.idl deleted file mode 100644 index 72b6b72ef04..00000000000 --- a/CIAO/ciao/CCM_Session2Context.idl +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container_Ex.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_SESSION2CONTEXT_IDL) -#define CCM_SESSION2CONTEXT_IDL - -#include "CCM_CCM2Context.idl" - -// *************** Extended Container Interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - enum BadComponentReferenceReason - { - NON_LOCAL_REFERENCE, - NON_COMPONENT_REFERENCE, - WRONG_CONTAINER - }; - exception BadComponentReference - { - BadComponentReferenceReason reason; - }; - - local interface Session2Context : SessionContext, CCM2Context - { - Object create_ref (in CORBA::RepositoryId repid); - - Object create_ref_from_oid (in CORBA::OctetSeq oid, - in CORBA::RepositoryId repid); - - CORBA::OctetSeq get_oid_from_ref (in Object objref) - raises (IllegalState, - BadComponentReference); - }; -}; -#endif /* CCM_SESSION2CONTEXT_IDL */ diff --git a/CIAO/ciao/CCM_SessionSynchronization.idl b/CIAO/ciao/CCM_SessionSynchronization.idl deleted file mode 100644 index 1e94b10ac34..00000000000 --- a/CIAO/ciao/CCM_SessionSynchronization.idl +++ /dev/null @@ -1,39 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Container.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_SESSIONSYNCHRONIZATION_IDL) -#define CCM_SESSIONSYNCHRONIZATION_IDL - -#include "CCM_CCMException.idl" - -// *************** Basic Container interfaces *************** - -module Components -{ - typeprefix Components "omg.org"; - - local interface SessionSynchronization - { - void after_begin () - raises (CCMException); - - void before_completion () - raises (CCMException); - - void after_completion (in boolean committed) - raises (CCMException); - }; -}; -#endif /* CCM_SESSIONSYNCHRONIZATION_IDL */ diff --git a/CIAO/ciao/CCM_StandardConfigurator.idl b/CIAO/ciao/CCM_StandardConfigurator.idl deleted file mode 100644 index e22ea585498..00000000000 --- a/CIAO/ciao/CCM_StandardConfigurator.idl +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Component.idl - */ - -#if !defined (CCM_STANDARDCONFIGURATOR_IDL) -#define CCM_STANDARDCONFIGURATOR_IDL - -#include "CCM_Configurator.idl" - -module Components -{ - typeprefix Components "omg.org"; - - valuetype ConfigValue - { - public FeatureName name; - public any value; - }; - - typedef sequence<ConfigValue> ConfigValues; - - interface StandardConfigurator : Configurator - { - void set_configuration (in ConfigValues descr); - }; - -}; -#endif /* CCM_STANDARDCONFIGURATOR_IDL */ diff --git a/CIAO/ciao/CCM_Transaction.idl b/CIAO/ciao/CCM_Transaction.idl deleted file mode 100644 index c0c8cdc2c1d..00000000000 --- a/CIAO/ciao/CCM_Transaction.idl +++ /dev/null @@ -1,89 +0,0 @@ -// $Id$ - -/** - * @@ Compile this file with: - * - * tao_idl -Gv -I ../.. -I ../../orbsvcs/orbsvcs \ - * -Wb,export_macro=CIAO_Export \ - * -Wb,export_include=CIAO_export.h \ - * -Wb,pre_include="ace/pre.h" \ - * -Wb,post_include="ace/post.h" \ - * CCM_Transaction.idl - */ - -//#define CIAO_HAS_IMPORT_KEYWORD - -#if !defined (CCM_TRANSACTION_IDL) -#define CCM_TRANSACTION_IDL - -module Components -{ - typeprefix Components "omg.org"; - - // @@ Components::Transaction is still there. - module Transaction - { - - typedef sequence<octet> TranToken; - - exception NoTransaction {}; - exception NotSupported {}; - exception SystemError {}; - exception RollbackError {}; - exception HeuristicMixed {}; - exception HeuristicRollback {}; - exception Security {}; - exception InvalidToken {}; - - enum Status - { - ACTIVE, - MARKED_ROLLBACK, - PREPARED, - COMMITTED, - ROLLED_BACK, - NO_TRANSACTION, - PREPARING, - COMMITTING, - ROLLING_BACK - }; - - local interface UserTransaction { - void begin () - raises (NotSupported, - SystemError); - - void commit () - raises (RollbackError, - NoTransaction, - HeuristicMixed, - HeuristicRollback, - Security, - SystemError); - - void rollback () - raises (NoTransaction, - Security, - SystemError); - - void set_rollback_only () - raises (NoTransaction, - SystemError); - - Status get_status() - raises (SystemError); - - void set_timeout (in long to) - raises (SystemError); - - TranToken suspend () - raises (NoTransaction, - SystemError); - - void resume (in TranToken txtoken) - raises (InvalidToken, - SystemError); - }; - }; -}; -#endif /* CCM_TRANSACTION_IDL */ diff --git a/CIAO/ciao/CIAO_Client_Export.h b/CIAO/ciao/CIAO_Client_Export.h deleted file mode 100644 index a566e94b0c2..00000000000 --- a/CIAO/ciao/CIAO_Client_Export.h +++ /dev/null @@ -1,50 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_CLIENT -// ------------------------------ -#ifndef CIAO_CLIENT_EXPORT_H -#define CIAO_CLIENT_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (CIAO_CLIENT_HAS_DLL) -# define CIAO_CLIENT_HAS_DLL 1 -#endif /* ! CIAO_CLIENT_HAS_DLL */ - -#if defined (CIAO_CLIENT_HAS_DLL) && (CIAO_CLIENT_HAS_DLL == 1) -# if defined (CIAO_CLIENT_BUILD_DLL) -# define CIAO_CLIENT_Export ACE_Proper_Export_Flag -# define CIAO_CLIENT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_CLIENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_CLIENT_BUILD_DLL */ -# define CIAO_CLIENT_Export ACE_Proper_Import_Flag -# define CIAO_CLIENT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_CLIENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_CLIENT_BUILD_DLL */ -#else /* CIAO_CLIENT_HAS_DLL == 1 */ -# define CIAO_CLIENT_Export -# define CIAO_CLIENT_SINGLETON_DECLARATION(T) -# define CIAO_CLIENT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_CLIENT_HAS_DLL == 1 */ - -// Set CIAO_CLIENT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_CLIENT_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_CLIENT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_CLIENT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_CLIENT_NTRACE */ - -#if (CIAO_CLIENT_NTRACE == 1) -# define CIAO_CLIENT_TRACE(X) -#else /* (CIAO_CLIENT_NTRACE == 1) */ -# define CIAO_CLIENT_TRACE(X) ACE_TRACE_IMPL(X) -#endif /* (CIAO_CLIENT_NTRACE == 1) */ - -#endif /* CIAO_CLIENT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/CIAO_Config.h b/CIAO/ciao/CIAO_Config.h deleted file mode 100644 index 42b04622520..00000000000 --- a/CIAO/ciao/CIAO_Config.h +++ /dev/null @@ -1,20 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file CIAO_Config.h - * - * $Id$ - * - * CIAO compile time configuration file. - * - * @author Bala Natarajan <bala @ dre.vanderbilt.edu> - */ -//============================================================================= -#ifndef CIAO_CONFIG_H -#define CIAO_CONFIG_H - -#if !defined (CIAO_DEFAULT_MAP_SIZE) -# define CIAO_DEFAULT_MAP_SIZE 64 -#endif /* CIAO_DEFAULT_MAP_SIZE */ - -#endif /*CIAO_CONFIG_H*/ diff --git a/CIAO/ciao/CIAO_Container_Export.h b/CIAO/ciao/CIAO_Container_Export.h deleted file mode 100644 index 74ba838721d..00000000000 --- a/CIAO/ciao/CIAO_Container_Export.h +++ /dev/null @@ -1,50 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_CONTAINER -// ------------------------------ -#ifndef CIAO_CONTAINER_EXPORT_H -#define CIAO_CONTAINER_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (CIAO_CONTAINER_HAS_DLL) -# define CIAO_CONTAINER_HAS_DLL 1 -#endif /* ! CIAO_CONTAINER_HAS_DLL */ - -#if defined (CIAO_CONTAINER_HAS_DLL) && (CIAO_CONTAINER_HAS_DLL == 1) -# if defined (CIAO_CONTAINER_BUILD_DLL) -# define CIAO_CONTAINER_Export ACE_Proper_Export_Flag -# define CIAO_CONTAINER_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_CONTAINER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_CONTAINER_BUILD_DLL */ -# define CIAO_CONTAINER_Export ACE_Proper_Import_Flag -# define CIAO_CONTAINER_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_CONTAINER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_CONTAINER_BUILD_DLL */ -#else /* CIAO_CONTAINER_HAS_DLL == 1 */ -# define CIAO_CONTAINER_Export -# define CIAO_CONTAINER_SINGLETON_DECLARATION(T) -# define CIAO_CONTAINER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_CONTAINER_HAS_DLL == 1 */ - -// Set CIAO_CONTAINER_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_CONTAINER_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_CONTAINER_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_CONTAINER_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_CONTAINER_NTRACE */ - -#if (CIAO_CONTAINER_NTRACE == 1) -# define CIAO_CONTAINER_TRACE(X) -#else /* (CIAO_CONTAINER_NTRACE == 1) */ -# define CIAO_CONTAINER_TRACE(X) ACE_TRACE_IMPL(X) -#endif /* (CIAO_CONTAINER_NTRACE == 1) */ - -#endif /* CIAO_CONTAINER_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/CIAO_Server_Export.h b/CIAO/ciao/CIAO_Server_Export.h deleted file mode 100644 index 2f0145331e9..00000000000 --- a/CIAO/ciao/CIAO_Server_Export.h +++ /dev/null @@ -1,50 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl CIAO_SERVER -// ------------------------------ -#ifndef CIAO_SERVER_EXPORT_H -#define CIAO_SERVER_EXPORT_H - -#include "ace/config-all.h" - -#if !defined (CIAO_SERVER_HAS_DLL) -# define CIAO_SERVER_HAS_DLL 1 -#endif /* ! CIAO_SERVER_HAS_DLL */ - -#if defined (CIAO_SERVER_HAS_DLL) && (CIAO_SERVER_HAS_DLL == 1) -# if defined (CIAO_SERVER_BUILD_DLL) -# define CIAO_SERVER_Export ACE_Proper_Export_Flag -# define CIAO_SERVER_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define CIAO_SERVER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* CIAO_SERVER_BUILD_DLL */ -# define CIAO_SERVER_Export ACE_Proper_Import_Flag -# define CIAO_SERVER_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define CIAO_SERVER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* CIAO_SERVER_BUILD_DLL */ -#else /* CIAO_SERVER_HAS_DLL == 1 */ -# define CIAO_SERVER_Export -# define CIAO_SERVER_SINGLETON_DECLARATION(T) -# define CIAO_SERVER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* CIAO_SERVER_HAS_DLL == 1 */ - -// Set CIAO_SERVER_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (CIAO_SERVER_NTRACE) -# if (ACE_NTRACE == 1) -# define CIAO_SERVER_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define CIAO_SERVER_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !CIAO_SERVER_NTRACE */ - -#if (CIAO_SERVER_NTRACE == 1) -# define CIAO_SERVER_TRACE(X) -#else /* (CIAO_SERVER_NTRACE == 1) */ -# define CIAO_SERVER_TRACE(X) ACE_TRACE_IMPL(X) -#endif /* (CIAO_SERVER_NTRACE == 1) */ - -#endif /* CIAO_SERVER_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/CIAO_common.h b/CIAO/ciao/CIAO_common.h deleted file mode 100644 index cd6caa908ba..00000000000 --- a/CIAO/ciao/CIAO_common.h +++ /dev/null @@ -1,80 +0,0 @@ -// $Id$ - -/** - * @file CIAO_common.h - * - * This file collects common CIAO macro definitions. - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - */ - -#ifndef CIAO_COMMON_H -#define CIAO_COMMON_H -#include /**/ "ace/pre.h" - -#include "ace/config-all.h" - -#if !defined ACE_LACKS_PRAGMA_ONCE -# pragma once -#endif /* ! ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Client_Export.h" - -#define CIAO_REGISTER_VALUE_FACTORY(ORB,FACTORY,VALUETYPE) {\ - CORBA::ValueFactory factory = new FACTORY; \ - CORBA::ValueFactory prev_factory = \ - ORB->register_value_factory \ - (VALUETYPE::_tao_obv_static_repository_id (), \ - factory); \ - if (prev_factory) prev_factory->_remove_ref (); \ - factory->_remove_ref (); } - -// By default tracing is turned off. -#if !defined (CIAO_NTRACE) -# if !defined (ACE_NTRACE) -# define CIAO_NTRACE 1 -# else -# define CIAO_NTRACE ACE_NTRACE -# endif -#endif /* CIAO_NTRACE */ - -#if (CIAO_NTRACE == 1) -# if !defined (ACE_NTRACE) -# define CIAO_TRACE(X) -# else -# if (ACE_NTRACE == 0) -# error CIAO_TRACE cannot be disabled if ACE_TRACE is enabled -# else -# define CIAO_TRACE(X) -# endif -# endif -#else -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define CIAO_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* CIAO_NTRACE */ - -namespace CIAO -{ - /** - * Return the debug level. The debug level of CIAO is control by - * an environment variable "CIAO_DEBUG_LEVEL". It should be an int - * value. If it is not defined, the default debug level is 0. The - * value of debug value is evaluated on its first use and the value - * is then cached. The actual implementation of this function is in - * Client_init.cpp. - * - * Some recommendation for using the debug_level - * - * > 0 : For component users. Component developers are encouraged - * to develop their own - * > 10 : For CIAO tools - * > 20 : For CIAO core. - */ - CIAO_CLIENT_Export int debug_level (void); -} - -#include /**/ "ace/post.h" -#endif /* CIAO_COMMON_H */ diff --git a/CIAO/ciao/Client_init.cpp b/CIAO/ciao/Client_init.cpp deleted file mode 100644 index 15325cf7a4e..00000000000 --- a/CIAO/ciao/Client_init.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// $Id$ - -#include "Client_init.h" -#include "CIAO_common.h" -#include "CCM_ComponentC.h" -#include "CCM_StandardConfiguratorC.h" -#include "ace/Env_Value_T.h" - -int -CIAO::Client_init (CORBA::ORB_ptr o) -{ - CIAO_REGISTER_VALUE_FACTORY (o, Components::Cookie_init, - Components::Cookie); - CIAO_REGISTER_VALUE_FACTORY (o, Components::PortDescription_init, - Components::PortDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::FacetDescription_init, - Components::FacetDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConnectionDescription_init, - Components::ConnectionDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ReceptacleDescription_init, - Components::ReceptacleDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConsumerDescription_init, - Components::ConsumerDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::EmitterDescription_init, - Components::EmitterDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::SubscriberDescription_init, - Components::SubscriberDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::PublisherDescription_init, - Components::PublisherDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConfigValue_init, - Components::ConfigValue); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ComponentPortDescription_init, - Components::ComponentPortDescription); - return 0; -} - -/// This should really be an anonymous namespace, but some compilers -/// still don't support this features. Therefore, just use a long -/// namespace name here. -namespace ciao_anonymous_namespace -{ - int debug_level = -1; -} - -int -CIAO::debug_level (void) -{ - if (ciao_anonymous_namespace::debug_level == -1) - { - // Initialize the thing. - ACE_Env_Value<int> envar ("CIAO_DEBUG_LEVEL", 1); - ciao_anonymous_namespace::debug_level = envar; - } - - return ciao_anonymous_namespace::debug_level; -} diff --git a/CIAO/ciao/Client_init.h b/CIAO/ciao/Client_init.h deleted file mode 100644 index 9c86e386778..00000000000 --- a/CIAO/ciao/Client_init.h +++ /dev/null @@ -1,47 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -/** - * @file Client_init.h - * - * Initializing CIAO client side ORB, if they need to. - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - */ - -#ifndef CIAO_CLIENT_INIT_H -#define CIAO_CLIENT_INIT_H -#include /**/ "ace/pre.h" - -#include "CIAO_Client_Export.h" - -#if !defined ACE_LACKS_PRAGMA_ONCE -#pragma once -#endif /* ! ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/orbconf.h" - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL -namespace CORBA -{ - class ORB; - typedef ORB *ORB_ptr; -} -TAO_END_VERSIONED_NAMESPACE_DECL - -namespace CIAO -{ - /** - * The initialize routine for any clients that need to access - * component. This routine now simply registers various valuetype - * factories defined in CIAO_Component.pidl. Currently, this method - * should be call right after ORB initialization but we should try - * to register these stuff automatically. - */ - CIAO_CLIENT_Export int Client_init (CORBA::ORB_ptr o); -} - - -#include /**/ "ace/post.h" -#endif /* CIAO_CLIENT_INIT_H */ diff --git a/CIAO/ciao/Components.idl b/CIAO/ciao/Components.idl deleted file mode 100644 index d73c101d2cc..00000000000 --- a/CIAO/ciao/Components.idl +++ /dev/null @@ -1,18 +0,0 @@ -// $Id$ - -/** - * @@ This file is included in the generated executor - * mapping IDL file, and for now just includes - * CCM_Container.idl. - */ - -#if !defined (CIAO_COMPONENTS_IDL) -#define CIAO_COMPONENTS_IDL - -#include "CCM_Component.idl" -#include "CCM_KeylessCCMHome.idl" -#include "CCM_Home.idl" -#include "CCM_Object.idl" - -#endif /* CIAO_COMPONENTS_IDL */ - diff --git a/CIAO/ciao/Container_Base.cpp b/CIAO/ciao/Container_Base.cpp deleted file mode 100644 index 1d6fea6ed12..00000000000 --- a/CIAO/ciao/Container_Base.cpp +++ /dev/null @@ -1,686 +0,0 @@ -// $Id$ - -#include "Container_Base.h" -#include "CIAO_common.h" -#include "ace/DLL.h" -#include "tao/Utils/PolicyList_Destroyer.h" -#include "ace/OS_NS_stdio.h" -#include "Servant_Activator.h" - -#if !defined (__ACE_INLINE__) -# include "Container_Base.inl" -#endif /* __ACE_INLINE__ */ - -namespace CIAO -{ - //////////////////////////////////////////////////////////////// - - Container::Container (CORBA::ORB_ptr o) - : orb_ (CORBA::ORB::_duplicate (o)), - container_impl_ (0) - { - } - - Container::Container (CORBA::ORB_ptr o, Container_Impl *container_impl) - : orb_ (CORBA::ORB::_duplicate (o)), - container_impl_ (container_impl) - { - } - - Container::~Container (void) - { - } - - PortableServer::POA_ptr - Container::the_POA (void) const - { - return this->component_poa_.in (); - } - - PortableServer::POA_ptr - Container::the_facet_cons_POA (void) const - { - return this->facet_cons_poa_.in (); - } - - CORBA::ORB_ptr - Container::the_ORB (void) const - { - return this->orb_.in (); - } - - /////////////////////////////////////////////////////////////// - - ACE_Atomic_Op <ACE_SYNCH_MUTEX, unsigned long> - Session_Container::serial_number_ (0); - - Session_Container::Session_Container (CORBA::ORB_ptr o, - Container_Impl *container_impl, - bool static_config_flag, - const Static_Config_EntryPoints_Maps* maps) - : Container (o, container_impl), - number_ (0), - static_config_flag_ (static_config_flag), - static_entrypts_maps_ (maps), - sa_ (0) - { - } - - Session_Container::~Session_Container (void) - { - if (! CORBA::is_nil (this->component_poa_.in ())) - { - this->component_poa_->destroy (1, 1); - } - - if (! CORBA::is_nil (this->facet_cons_poa_.in ())) - { - this->facet_cons_poa_->destroy (1, 1); - } - - if (! CORBA::is_nil (this->home_servant_poa_.in ())) - { - this->home_servant_poa_->destroy (1, 1); - } - - delete this->sa_; - } - - int - Session_Container::init (const char *name, - const CORBA::PolicyList *more_policies - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::init"); - - char buffer[MAXPATHLEN]; - - if (name == 0) - { - this->number_ = ++Session_Container::serial_number_; - ACE_OS::sprintf (buffer, - "CIAO::Session_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); - - ACE_CString port_poa_name (name); - port_poa_name += ":Port_POA"; - this->create_facet_consumer_POA (port_poa_name.c_str (), - 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 - Session_Container::create_component_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL) - { - CIAO_TRACE ("Session_Container::create_component_POA"); - - // Set up proper poa policies here. Default policies seems to be - // fine for session container. If you add some other default - // policies here, then you need to "add" more_policies below - // instead of simply assigning more_policies to the init policy - // list. - CORBA::PolicyList policies (0); - - if (p != 0) - { - policies = *p; - } - - PortableServer::POAManager_var poa_manager = - root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->component_poa_ = - root->create_POA (name, - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - Session_Container::create_facet_consumer_POA ( - const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL) - { - CIAO_TRACE ("Session_Container::create_facet_consumer_POA"); - - PortableServer::POAManager_var poa_manager = - root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - CORBA::ULong p_length = 0; - if (p != 0) - { - p_length = p->length (); - } - - TAO::Utils::PolicyList_Destroyer policies (p_length + 3); - policies.length (p_length + 3); - - policies[0] = - root->create_id_assignment_policy (PortableServer::USER_ID - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // Servant Manager Policy - policies[1] = - root->create_request_processing_policy - (PortableServer::USE_SERVANT_MANAGER - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - // Servant Retention Policy - policies[2] = - root->create_servant_retention_policy (PortableServer::RETAIN - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - for (CORBA::ULong i = 0; i < p_length; ++i) - { - policies[i+3] = (*p)[i]; - } - - this->facet_cons_poa_ = - root->create_POA (name, - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_NEW_THROW_EX (this->sa_, - Servant_Activator (this->orb_.in ()), - CORBA::NO_MEMORY ()); - - this->facet_cons_poa_->set_servant_manager ( - this->sa_ - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK; - } - - CORBA::Object_ptr - Session_Container::install_servant (PortableServer::Servant p, - Container::OA_Type t - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::install_servant"); - - PortableServer::POA_ptr tmp = 0; - - if (t == Container::Component) - { - tmp = this->component_poa_.in (); - } - else - { - tmp = this->facet_cons_poa_.in (); - } - - PortableServer::ObjectId_var oid = - tmp->activate_object (p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CORBA::Object_var objref = - tmp->id_to_reference (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return objref._retn (); - } - - CORBA::Object_ptr - Session_Container::install_component (PortableServer::Servant p, - PortableServer::ObjectId_out oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::install_component"); - PortableServer::ObjectId_var id = - this->component_poa_->activate_object (p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CORBA::Object_var objref = - this->component_poa_->id_to_reference (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - oid = id._retn (); - - return objref._retn (); - } - - - //@@ Apparently we need to be cautious when handling the exception - // thrown here. We should make sure that new DnC interfaces - // NodeApplication/NodeApplicationManager etc will cache the new - // exceptions--> rethrow of new exceptions is needed. - // --Tao - Components::CCMHome_ptr - Session_Container::ciao_install_home (const char *exe_dll_name, - const char *exe_entrypt, - const char *sv_dll_name, - const char *sv_entrypt, - const char *ins_name - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Deployment::UnknownImplId, - Deployment::ImplEntryPointNotFound, - Deployment::InstallationFailure)) - { - CIAO_TRACE ("Session_Container::ciao_install_home"); - - HomeFactory hcreator = 0; - ServantFactory screator = 0; - - if (this->static_config_flag_ == false) - { - ACE_DLL executor_dll, servant_dll; - - if (exe_dll_name == 0 || sv_dll_name == 0) - { - ACE_CString exception; - - if (exe_dll_name == 0) - { - exception = "Null component executor DLL name"; - } - - if (sv_dll_name == 0) - { - exception = "Null component servant DLL name"; - } - - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) Container_Base.cpp -" - "Session_Container::ciao_install_home -" - "ERROR: %s\n", - exception.c_str ())); - - ACE_THROW_RETURN - (Deployment::UnknownImplId ( - "Session_Container::ciao_install_home", - exception.c_str ()), - Components::CCMHome::_nil ()); - } - - if (executor_dll.open (exe_dll_name, - ACE_DEFAULT_SHLIB_MODE, - 0) != 0) - { - ACE_CString error ("Failed to open executor DLL: "); - error += exe_dll_name; - - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) Container_Base.cpp -" - "Session_Container::ciao_install_home -" - "ERROR in opening the executor DLL [%s] \n", - exe_dll_name)); - - ACE_THROW_RETURN - (Deployment::UnknownImplId - ("Session_Container::ciao_install_home", - error.c_str ()), Components::CCMHome::_nil ()); - } - - if (servant_dll.open (sv_dll_name, - ACE_DEFAULT_SHLIB_MODE, - 0) != 0) - { - ACE_CString error ("Failed to open executor DLL: "); - error += sv_dll_name; - - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) Container_Base.cpp -" - "Session_Container::ciao_install_home -" - "ERROR in opening the servant DLL [%s] \n", - sv_dll_name)); - - ACE_THROW_RETURN - (Deployment::UnknownImplId - ("Session_Container::ciao_install_home", - error.c_str ()), Components::CCMHome::_nil ()); - } - - if (exe_entrypt == 0 || sv_entrypt == 0) - { - ACE_CString error ("Entry point is null for "); - - if (exe_entrypt == 0) - { - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) Container_Base.cpp -" - "Session_Container::ciao_install_home -" - "ERROR in opening the executor entry point " - "for executor DLL [%s] \n", - exe_dll_name)); - error += exe_dll_name; - } - else - { - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) Container_Base.cpp -" - "Session_Container::ciao_install_home -" - "ERROR in opening the servant entry point " - "for servant DLL [%s] \n", - sv_dll_name)); - error += sv_dll_name; - } - - ACE_THROW_RETURN - (Deployment::ImplEntryPointNotFound - ("Session_Container::ciao_install_home", - error.c_str ()), Components::CCMHome::_nil ()); - } - - // We have to do this casting in two steps because the C++ - // standard forbids casting a pointer-to-object (including - // void*) directly to a pointer-to-function. - void *void_ptr = executor_dll.symbol (exe_entrypt); - ptrdiff_t tmp_ptr = reinterpret_cast<ptrdiff_t> (void_ptr); - hcreator = reinterpret_cast<HomeFactory> (tmp_ptr); - - void_ptr = servant_dll.symbol (sv_entrypt); - tmp_ptr = reinterpret_cast<ptrdiff_t> (void_ptr); - screator = reinterpret_cast<ServantFactory> (tmp_ptr); - } - else - { - if (static_entrypts_maps_ == 0 - || static_entrypts_maps_->home_creator_funcptr_map_ == 0 - || static_entrypts_maps_->home_servant_creator_funcptr_map_ == 0) - { - ACE_THROW_RETURN (Deployment::ImplEntryPointNotFound (), - Components::CCMHome::_nil ()); - } - - ACE_CString exe_entrypt_str (exe_entrypt); - static_entrypts_maps_->home_creator_funcptr_map_->find ( - exe_entrypt_str, - hcreator - ); - - ACE_CString sv_entrypt_str (sv_entrypt); - static_entrypts_maps_->home_servant_creator_funcptr_map_->find ( - sv_entrypt_str, - screator - ); - } - - if (hcreator == 0 || screator == 0) - { - ACE_CString error ("Entry point "); - - if (hcreator == 0) - { - error += exe_entrypt; - error += " invalid in dll "; - error += exe_dll_name; - } - else - { - error += sv_entrypt; - error += " invalid in dll "; - error += sv_dll_name; - } - - ACE_THROW_RETURN - (Deployment::ImplEntryPointNotFound - ("SessionContainer::ciao_install_home", - error.c_str ()), Components::CCMHome::_nil ()); - } - - Components::HomeExecutorBase_var home_executor = hcreator (); - - if (CORBA::is_nil (home_executor.in ())) - { - ACE_THROW_RETURN - (Deployment::InstallationFailure - ("SessionContainer::ciao_install_home", - "Executor entrypoint failed to create a home."), - Components::CCMHome::_nil ()); - } - - PortableServer::Servant home_servant = screator (home_executor.in (), - this, - ins_name - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Components::CCMHome::_nil ()); - - if (home_servant == 0) - { - ACE_THROW_RETURN - (Deployment::InstallationFailure - ("SessionContainer::ciao_install_home", - "Servant entrypoing failed to create a home."), - Components::CCMHome::_nil ()); - } - - PortableServer::ServantBase_var safe (home_servant); - - CORBA::Object_var objref = - this->install_servant (home_servant, - Container::Component - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (Components::CCMHome::_nil ()); - - Components::CCMHome_var homeref = - Components::CCMHome::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return homeref._retn (); - } - - void - Session_Container::ciao_uninstall_home (Components::CCMHome_ptr homeref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::ciao_uninstall_home"); - - this->uninstall (homeref, - Container::Component - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - Session_Container::uninstall (CORBA::Object_ptr objref, - Container::OA_Type t - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::uninstall"); - - PortableServer::POA_ptr tmp = 0; - - if (t == Container::Component) - { - tmp = this->component_poa_.in (); - } - else - { - tmp = this->facet_cons_poa_.in (); - } - - PortableServer::ObjectId_var oid = - tmp->reference_to_id (objref - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - tmp->deactivate_object (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - Session_Container::uninstall (PortableServer::Servant svt, - Container::OA_Type t - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::uninstall"); - PortableServer::POA_ptr tmp = 0; - - if (t == Container::Component) - { - tmp = this->component_poa_.in (); - } - else - { - tmp = this->facet_cons_poa_.in (); - } - - PortableServer::ObjectId_var oid - = tmp->servant_to_id (svt - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - tmp->deactivate_object (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - Session_Container::uninstall_component (Components::CCMObject_ptr objref, - PortableServer::ObjectId_out oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::uninstall_component"); - - PortableServer::ObjectId_var id = - this->component_poa_->reference_to_id (objref - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->component_poa_->deactivate_object (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - oid = id._retn (); - } - - void - Session_Container::add_servant_map ( - PortableServer::ObjectId &, - Dynamic_Component_Servant_Base* - ACE_ENV_ARG_DECL_NOT_USED - ) - { - CIAO_TRACE ("Session_Container::add_servant_map"); - } - - void - Session_Container::deactivate_facet (const PortableServer::ObjectId & - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::deactivate_facet"); - } - - void - Session_Container::delete_servant_map ( - PortableServer::ObjectId & - ACE_ENV_ARG_DECL_NOT_USED - ) - { - CIAO_TRACE ("Session_Container::delete_servant_map"); - } - - CORBA::Object_ptr - Session_Container::get_home_objref (PortableServer::Servant - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Session_Container::get_home_objref"); - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); - } - - CORBA::Object_ptr - Session_Container::generate_reference (const char *obj_id, - const char *repo_id, - Container::OA_Type t - ACE_ENV_ARG_DECL) - { - CIAO_TRACE ("Session_Container::generate_reference"); - - PortableServer::POA_ptr tmp = 0; - - if (t == Container::Component) - { - tmp = this->component_poa_.in (); - } - else - { - tmp = this->facet_cons_poa_.in (); - } - - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (obj_id); - - CORBA::String_var str = - PortableServer::ObjectId_to_string (oid.in ()); - - if (t == Container::Facet_Consumer) - { - //if (CIAO::debug_level () > 9) - // ACE_DEBUG ((LM_DEBUG, "STRING in container is %s\n", - // str.in ())); - } - - CORBA::Object_var objref = - tmp->create_reference_with_id (oid.in (), - repo_id - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - return objref._retn (); - } -} diff --git a/CIAO/ciao/Container_Base.h b/CIAO/ciao/Container_Base.h deleted file mode 100644 index cbde8a4d6c0..00000000000 --- a/CIAO/ciao/Container_Base.h +++ /dev/null @@ -1,356 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Container_Base.h - * - * $Id$ - * - * Header file for CIAO's container implementations - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - * @author Gan Deng <dengg@dre.vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_CONTAINER_BASE_H -#define CIAO_CONTAINER_BASE_H - -#include /**/ "ace/pre.h" - -#include "ciao/CCM_ContainerC.h" -#include "ciao/Deployment_CoreC.h" -#include "ciao/CIAO_Server_Export.h" - -#include "tao/PortableServer/PortableServer.h" -#include "tao/PortableServer/Servant_Base.h" - -#include "tao/ORB.h" - -#include "ace/Hash_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - class Servant_Activator; - class Dynamic_Component_Servant_Base; - class Container_Impl; - - /** - * @class Container - * - * @brief Common container interface definition. - * - * Perhaps we can use local interface to define these interfaces as - * we will also get reference counting automatically. - */ - class CIAO_SERVER_Export Container - { - public: - enum OA_Type - { - Component, - Facet_Consumer - }; - - Container (CORBA::ORB_ptr o); - Container (CORBA::ORB_ptr o, Container_Impl *container_impl); - - virtual ~Container (void) = 0; - - /// Get component's POA. - /** - * This operation does *NOT* increase the reference count of the - * POA. Look at the const qualifier in the method. - */ - PortableServer::POA_ptr the_POA (void) const; - PortableServer::POA_ptr the_facet_cons_POA (void) const; - - /// Get a reference to the underlying ORB. - CORBA::ORB_ptr the_ORB (void) const; - - /// 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)) = 0; - - /// Install a new home - virtual Components::CCMHome_ptr ciao_install_home ( - const char *exe_dll_name, - const char *exe_entrypt, - const char *sv_dll_name, - const char *sv_entrypt, - const char *ins_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Deployment::UnknownImplId, - Deployment::ImplEntryPointNotFound, - Deployment::InstallationFailure)) = 0; - - // Uninstall a servant for component or home. - virtual void ciao_uninstall_home (Components::CCMHome_ptr homeref - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - // Uninstall a servant for component. - virtual void uninstall_component (::Components::CCMObject_ptr objref, - PortableServer::ObjectId_out oid - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - // @@Jai, please see the Session Container class for comments. - // @@ Jai, do you really need the environment variable? - virtual void add_servant_map (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant - ACE_ENV_ARG_DECL) = 0; - - virtual void delete_servant_map (PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) = 0; - - virtual CORBA::Object_ptr get_home_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - protected: - /// Reference to the ORB - CORBA::ORB_var orb_; - - /// POA within which all the components in this container will be - /// activated. - PortableServer::POA_var component_poa_; - - /// POA within which all the facets and receptacles will be - /// activated. - /** - * Having two POA's allows us to associate different policies that - * are distinct from the component. - */ - PortableServer::POA_var facet_cons_poa_; - - PortableServer::POA_var home_servant_poa_; - Container_Impl *container_impl_; - private: - /// Not allowed to be used - Container (void); - }; - - class Session_Container; - - typedef ::Components::HomeExecutorBase_ptr (*HomeFactory) (void); - typedef ::PortableServer::Servant (*ServantFactory) - (::Components::HomeExecutorBase_ptr p, - ::CIAO::Session_Container *c, - const char *ins_name -#if !defined (TAO_HAS_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT) - , CORBA::Environment & -#endif - ); - - typedef ACE_Hash_Map_Manager_Ex<ACE_CString, - HomeFactory, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> HOMECREATOR_FUNCPTR_MAP; - - typedef ACE_Hash_Map_Manager_Ex<ACE_CString, - ServantFactory, - ACE_Hash<ACE_CString>, - ACE_Equal_To<ACE_CString>, - ACE_Null_Mutex> HOMESERVANTCREATOR_FUNCPTR_MAP; - - struct Static_Config_EntryPoints_Maps - { - /// Map of home creator entry point name and func ptr - HOMECREATOR_FUNCPTR_MAP* home_creator_funcptr_map_; - - /// Map of home servant creator entry point name and func ptr - HOMESERVANTCREATOR_FUNCPTR_MAP* home_servant_creator_funcptr_map_; - }; - - class CIAO_SERVER_Export Session_Container : public Container - { - public: - Session_Container (CORBA::ORB_ptr o, - Container_Impl *container_impl, - bool static_config_flag = false, - const Static_Config_EntryPoints_Maps* static_entrypts_maps =0); - - virtual ~Session_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)); - - /** - * @brief Simply installing a home executor into the component. - * - * This operation install a home executor into the component. It - * requires the name of the DLLs to executor and the servant glue - * code, and the entry points to the respective DLLs. Currently, - * we don't try to manage the lifetime of DLL objects, but we - * should at some later point. - * - * @retval Home objref of the installed home. - */ - virtual Components::CCMHome_ptr ciao_install_home ( - const char *exe_dll_name, - const char *exe_entrypt, - const char *sv_dll_name, - const char *sv_entrypt, - const char *ins_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Deployment::UnknownImplId, - Deployment::ImplEntryPointNotFound, - Deployment::InstallationFailure)); - - /// Uninstall a servant for component or home. - virtual void ciao_uninstall_home (Components::CCMHome_ptr homeref - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Uninstall a servant for component. - virtual void uninstall_component (::Components::CCMObject_ptr objref, - PortableServer::ObjectId_out oid - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Install a servant for component or home. - virtual CORBA::Object_ptr install_servant (PortableServer::Servant p, - Container::OA_Type t - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Install a component servant. - CORBA::Object_ptr install_component (PortableServer::Servant p, - PortableServer::ObjectId_out oid - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Get an object reference to a component or home from the servant. - virtual CORBA::Object_ptr get_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Uninstall a servant for component or home. - void uninstall (CORBA::Object_ptr objref, - Container::OA_Type t - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Uninstall a servant for component or home. - void uninstall (PortableServer::Servant svt, - Container::OA_Type t - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // @@Jai, please consider naming this method as - // "add_servant_to_map ()" to be more descriptive. - virtual void add_servant_map (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant - ACE_ENV_ARG_DECL); - - // @@Jai, please consider naming this method as - // "delete_servant_from_map ()" to be more descriptive. - virtual void delete_servant_map (PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL); - - // @@Jai, could yo please add documentation? - /* - * @@Jai, you may want to consider moving these away from the - * container interface. I know what you are going to say - * :-). Consider using dynamic_cast <> to access - * add_servant_to_map, delete_servant_from_map and - * deactivate_facet from the Swapping_Conatiner's interface. It - * would make the base container interface much cleaner. - */ - virtual void deactivate_facet (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr get_home_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Analog of the POA method that creates an object reference from - /// an object id string. - CORBA::Object_ptr generate_reference (const char *obj_id, - const char *repo_id, - Container::OA_Type t - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - /// Return the servant activator factory that activates the - /// servants for facets and consumers. - Servant_Activator *ports_servant_activator (void) const; - - private: - - /// Create POA for the component. - /** - * This is the POA that is returned to the component applications - * if they need one. - */ - void create_component_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - /// Create POA for the facets and consumers alone. - void create_facet_consumer_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - /// Not allowed to be - Session_Container (void); - - protected: - unsigned long number_; - - /// Static variable to store the highest number we have given out until - /// now - static ACE_Atomic_Op <ACE_SYNCH_MUTEX, unsigned long> serial_number_; - - const bool static_config_flag_; - const Static_Config_EntryPoints_Maps* static_entrypts_maps_; - - /// The servant activator factory used to activate facets and - /// consumer servants. - Servant_Activator *sa_; - }; -} - -// 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 "Container_Base.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* CIAO_CONTAINER_BASE_H */ diff --git a/CIAO/ciao/Container_Base.inl b/CIAO/ciao/Container_Base.inl deleted file mode 100644 index 0d6aeef9bcc..00000000000 --- a/CIAO/ciao/Container_Base.inl +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ -*- C++ -*- - -ACE_INLINE CORBA::Object_ptr -CIAO::Session_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); -} - -ACE_INLINE CIAO::Servant_Activator * -CIAO::Session_Container::ports_servant_activator (void) const -{ - return this->sa_; -} diff --git a/CIAO/ciao/Context_Impl_Base.cpp b/CIAO/ciao/Context_Impl_Base.cpp deleted file mode 100644 index 6b31dedf392..00000000000 --- a/CIAO/ciao/Context_Impl_Base.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -#include "Context_Impl_Base.h" - -namespace CIAO -{ - Context_Impl_Base::Context_Impl_Base (void) - { - ACE_ASSERT (0); - } - - Context_Impl_Base::Context_Impl_Base (Components::CCMHome_ptr home, - Session_Container * c) - : home_ (Components::CCMHome::_duplicate (home)), - container_ (c) - { - } - - Context_Impl_Base::~Context_Impl_Base (void) - { - } - - // Operations from ::Components::CCMContext. - - Components::Principal_ptr - Context_Impl_Base::get_caller_principal ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - Components::Principal::_nil ()); - } - - Components::CCMHome_ptr - Context_Impl_Base::get_CCM_home ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return Components::CCMHome::_duplicate (this->home_.in ()); - } - - CORBA::Boolean - Context_Impl_Base::get_rollback_only ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), false); - } - - Components::Transaction::UserTransaction_ptr - Context_Impl_Base::get_user_transaction ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - Components::Transaction::UserTransaction::_nil ()); - } - - CORBA::Boolean - Context_Impl_Base::is_caller_in_role ( - const char * /* role */ - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), false); - } - - void - Context_Impl_Base::set_rollback_only ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) - { - ACE_THROW (CORBA::NO_IMPLEMENT ()); - } - - // CIAO-specific. - - CIAO::Session_Container * - Context_Impl_Base::_ciao_the_Container (void) const - { - return this->container_; - } - - const char * - Context_Impl_Base::_ciao_instance_id (void) const - { - return this->ciao_instance_id_.in (); - } - - void - Context_Impl_Base::_ciao_instance_id (const char *instance_id) - { - this->ciao_instance_id_ = instance_id; - } -} diff --git a/CIAO/ciao/Context_Impl_Base.h b/CIAO/ciao/Context_Impl_Base.h deleted file mode 100644 index dbed5dcafa3..00000000000 --- a/CIAO/ciao/Context_Impl_Base.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Context_Impl_Base.h - * - * $Id$ - * - * This file contains the non-template declaration of a base class for - * the template mixin for the generated context class. - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_CONTEXT_IMPL_BASE_H -#define CIAO_CONTEXT_IMPL_BASE_H - -#include /**/ "ace/pre.h" - -#include "CIAO_Server_Export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/CCM_ContainerC.h" -#include "tao/Objref_VarOut_T.h" - -namespace Components -{ - class CCMHome; - typedef CCMHome *CCMHome_ptr; - - typedef - TAO_Objref_Var_T< - CCMHome - > - CCMHome_var; -} - -namespace CIAO -{ - class Session_Container; - - /** - * @class Context_Impl_Base - * - * @brief Non-template base class for Context_Impl. - * - * Holds the non-template parts of its child class - * Context_Impl. - */ - class CIAO_SERVER_Export Context_Impl_Base - : public virtual Components::CCMContext - { - public: - /// @todo This constructor should be declarated private but it seems - /// the compilers want it, have to sort this out in detail. - Context_Impl_Base (void); - - Context_Impl_Base (Components::CCMHome_ptr home, - Session_Container * c); - - virtual ~Context_Impl_Base (void); - - // Operations from ::Components::CCMContext. - - virtual Components::Principal_ptr - get_caller_principal (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual Components::CCMHome_ptr - get_CCM_home (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Boolean - get_rollback_only (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - virtual Components::Transaction::UserTransaction_ptr - get_user_transaction (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - virtual CORBA::Boolean - is_caller_in_role (const char *role - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - set_rollback_only (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - // CIAO-specific. - - CIAO::Session_Container *_ciao_the_Container (void) const; - - // Accessors for the private member. - const char *_ciao_instance_id (void) const; - void _ciao_instance_id (const char *instance_id); - - protected: - Components::CCMHome_var home_; - Session_Container *container_; - - private: - CORBA::String_var ciao_instance_id_; - }; -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_CONTEXT_IMPL_BASE_H */ diff --git a/CIAO/ciao/Context_Impl_T.cpp b/CIAO/ciao/Context_Impl_T.cpp deleted file mode 100644 index 0ef58a1b735..00000000000 --- a/CIAO/ciao/Context_Impl_T.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// $Id$ - -#ifndef CIAO_CONTEXT_IMPL_T_C -#define CIAO_CONTEXT_IMPL_T_C - -#include "Context_Impl_T.h" - -namespace CIAO -{ - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>::Context_Impl ( - Components::CCMHome_ptr home, - Session_Container *c, - SVNT *sv) - : Context_Impl_Base (home, c), - servant_ (sv) - { - } - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>::~Context_Impl (void) - { - } - - // Operations from ::Components::SessionContext. - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - CORBA::Object_ptr - Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>::get_CCM_object ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)) - { - if (CORBA::is_nil (this->component_.in ())) - { - CORBA::Object_var obj; - - ACE_TRY - { - obj = - this->container_->get_objref (this->servant_ - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Caught Exception \n"); - return CORBA::Object::_nil (); - } - ACE_ENDTRY; - - - this->component_ = COMP::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Object::_nil ()); - - if (CORBA::is_nil (this->component_.in ())) - { - ACE_THROW_RETURN (CORBA::INTERNAL (), - CORBA::Object::_nil ()); - } - } - - return COMP::_duplicate (this->component_.in ()); - } -} - -#endif /* CIAO_CONTEXT_IMPL_T_C */ diff --git a/CIAO/ciao/Context_Impl_T.h b/CIAO/ciao/Context_Impl_T.h deleted file mode 100644 index cc09becfd35..00000000000 --- a/CIAO/ciao/Context_Impl_T.h +++ /dev/null @@ -1,105 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Context_Impl_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated context class. - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_CONTEXT_IMPL_T_H -#define CIAO_CONTEXT_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "Context_Impl_Base.h" -#include "tao/LocalObject.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL -namespace CORBA -{ - class SystemException; -} - -namespace SecurityLevel2 -{ - class Credentials; -} -TAO_END_VERSIONED_NAMESPACE_DECL - -namespace Components -{ - typedef SecurityLevel2::Credentials Principal; - typedef Principal *Principal_ptr; - - class IllegalState; - - namespace Transaction - { - class UserTransaction; - typedef UserTransaction *UserTransaction_ptr; - } -} - -namespace CIAO -{ - class Session_Container; - - /** - * @class Context_Impl - * - * @brief Mixin base class for generated context. - * - * This class implements operations and contains parameterized - * members common to all generated servants. - */ - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - class Context_Impl : public virtual BASE_CTX, - public virtual Context_Impl_Base, - public virtual TAO_Local_RefCounted_Object - { - public: - Context_Impl (Components::CCMHome_ptr home, - Session_Container *c, - SVNT *sv); - - virtual ~Context_Impl (void); - - // Operations from ::Components::SessionContext. - - virtual CORBA::Object_ptr - get_CCM_object (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::IllegalState)); - - protected: - SVNT *servant_; - COMP_VAR component_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Context_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Context_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_CONTEXT_IMPL_T_H */ diff --git a/CIAO/ciao/Cookies.cpp b/CIAO/ciao/Cookies.cpp deleted file mode 100644 index 4a319577be4..00000000000 --- a/CIAO/ciao/Cookies.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ -#include "Cookies.h" - -#if !defined (__ACE_INLINE__) -#include "Cookies.inl" -#endif /* !defined INLINE */ - -ACE_RCSID (ciao, - Cookies, - "$Id$") - -namespace CIAO -{ - Map_Key_Cookie::Map_Key_Cookie (const ACE_Active_Map_Manager_Key &key) - { - this->cookieValue ().length (ACE_Active_Map_Manager_Key::size ()); - key.encode (this->cookieValue ().get_buffer (0)); - } - - Map_Key_Cookie::~Map_Key_Cookie (void) - { - } - - bool - Map_Key_Cookie::insert (ACE_Active_Map_Manager_Key &key) - { - this->cookieValue ().length (ACE_Active_Map_Manager_Key::size ()); - key.encode (this->cookieValue ().get_buffer (0)); - return true; - } - - bool - Map_Key_Cookie::extract (::Components::Cookie *ck, - ACE_Active_Map_Manager_Key &key) - { - Map_Key_Cookie *c = - dynamic_cast <Map_Key_Cookie *> (ck); - - if (c == 0) - return false; - - ::CORBA::OctetSeq *x = c->get_cookie (); - - if (x->length () != ACE_Active_Map_Manager_Key::size ()) - return false; - - key.decode (x->get_buffer ()); - - return true; - } - - ::CORBA::OctetSeq * - Map_Key_Cookie::get_cookie (void) - { - return &this->cookieValue (); - } - - //======================================================== - CORBA::ValueBase * - Map_Key_Cookie_init::create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL) - { - CORBA::ValueBase *ret_val = 0; - - ACE_NEW_THROW_EX (ret_val, - CIAO::Map_Key_Cookie, - CORBA::NO_MEMORY ()); - - // @@ (OO) An "ACE_CHECK_RETURN (0) is missing here. - - return ret_val; - } - - -} diff --git a/CIAO/ciao/Cookies.h b/CIAO/ciao/Cookies.h deleted file mode 100644 index 995629378d2..00000000000 --- a/CIAO/ciao/Cookies.h +++ /dev/null @@ -1,73 +0,0 @@ -// $Id$ - -/** - * @file Cookies.h - * - * A CIAO implementation of Cookie valuetype. - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - */ - -#ifndef CIAO_COOKIES_H -#define CIAO_COOKIES_H -#include /**/ "ace/pre.h" - -#include "CCM_CookieC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Container_Export.h" -#include "ace/Active_Map_Manager.h" - -namespace CIAO -{ - /** - * @class Map_Key_Cookie - * - * @brief A internal cookie valuetype implementation. - */ - class CIAO_CONTAINER_Export Map_Key_Cookie - : public virtual OBV_Components::Cookie - { - public: - Map_Key_Cookie (void); - - virtual ~Map_Key_Cookie (void); - - /// Initialize a @c Cookie with an @c ACE_Active_Map_Manager_Key - Map_Key_Cookie (const ACE_Active_Map_Manager_Key &key); - - /// Insert the @c ACE_Active_Map_Manager_Key - bool insert (ACE_Active_Map_Manager_Key &key); - - /// Operation on the valuetype - CORBA::OctetSeq * get_cookie (void); - - /// Extract the @c ACE_Active_Map_Manager_Key - static bool extract (::Components::Cookie *c, - ACE_Active_Map_Manager_Key &key); - }; - - /** - * @class Map_Key_Cookie_init - * - * @brief Valuefactory implementation for Cookies. - */ - class CIAO_CONTAINER_Export Map_Key_Cookie_init : - public virtual ::Components::Cookie_init - { - public: - virtual ~Map_Key_Cookie_init (void); - - virtual CORBA::ValueBase *create_for_unmarshal (ACE_ENV_SINGLE_ARG_DECL); - }; -} - -#if defined (__ACE_INLINE__) -#include "Cookies.inl" -#endif /* !defined INLINE */ - -#include /**/ "ace/post.h" -#endif /* CIAO_COOKIES_H */ diff --git a/CIAO/ciao/Cookies.inl b/CIAO/ciao/Cookies.inl deleted file mode 100644 index e4d89f595c7..00000000000 --- a/CIAO/ciao/Cookies.inl +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -namespace CIAO -{ - ACE_INLINE - Map_Key_Cookie::Map_Key_Cookie (void) - { - } - - // ======================================== - ACE_INLINE - Map_Key_Cookie_init::~Map_Key_Cookie_init () - { - } -} diff --git a/CIAO/ciao/CosPersistentState.idl b/CIAO/ciao/CosPersistentState.idl deleted file mode 100644 index a5211d071aa..00000000000 --- a/CIAO/ciao/CosPersistentState.idl +++ /dev/null @@ -1,24 +0,0 @@ -// $Id$ - -/** - * @@ This is just a temporary file. Since TAO does not have - * CosPersistentState at all, we use this file to define - * types necessary to get ComponentBase.idl to compile. - * - * Compile with - * tao_idl -Gv CosPersistentState.idl - */ - -#if !defined (CIAO_COSPERSISTENTSTATE_PIDL) -#define CIAO_COSPERSISTENTSTATE_PIDL - -module CosPersistentState { - - local interface CatalogBase - { - }; - - typedef sequence<octet> _TypeId; - typedef string Pid; -}; -#endif /* CIAO_COSPERSISTENTSTATE_PIDL */ diff --git a/CIAO/ciao/Deployment.idl b/CIAO/ciao/Deployment.idl deleted file mode 100644 index d7c952a8c51..00000000000 --- a/CIAO/ciao/Deployment.idl +++ /dev/null @@ -1,41 +0,0 @@ -// $Id$ - -#ifndef DEPLOYMENT_IDL -#define DEPLOYMENT_IDL - -#include "Deployment_Data.idl" -#include "Packaging_Data.idl" -#include "Target_Data.idl" -#include "ServerResources.idl" - -module Deployment { - - exception InvalidProperty { - string name; - string reason; - }; - - exception NoSuchName { - }; - - exception LastConfiguration { - }; - - exception InvalidReference { - }; - - /// Below exception types are CIAO specific - exception PlanNotExist { - }; - - /// CIAO specific struct type used for shared component management - /// mapping the name of component to its plan_uuid - struct ComponentPlan - { - string name; - string plan_uuid; - }; - typedef sequence < ComponentPlan > ComponentPlans; -}; - -#endif /* DEPLOYMENT_IDL */ diff --git a/CIAO/ciao/Deployment_Application.idl b/CIAO/ciao/Deployment_Application.idl deleted file mode 100644 index 4ae531357c5..00000000000 --- a/CIAO/ciao/Deployment_Application.idl +++ /dev/null @@ -1,34 +0,0 @@ -// $Id$ - -#if !defined (DEPLOYMENT_APPLICATION_IDL) -#define DEPLOYMENT_APPLICATION_IDL - -#include "Deployment_Connection.idl" - -module Deployment -{ - exception StartError - { - string name; - string reason; - }; - - exception InvalidConnection - { - string name; - string reason; - }; - - interface Application - { - void finishLaunch (in Connections providedReference, - in boolean start, - in boolean is_ReDAC) - raises (StartError, InvalidConnection); - void start () - raises (StartError); - }; - typedef sequence < Application > Applications; -}; - -#endif /* DEPLOYMENT_APPLICATION_IDL */ diff --git a/CIAO/ciao/Deployment_Base.idl b/CIAO/ciao/Deployment_Base.idl deleted file mode 100644 index 5b9618dfab2..00000000000 --- a/CIAO/ciao/Deployment_Base.idl +++ /dev/null @@ -1,42 +0,0 @@ -//$Id$ - -#ifndef DEPLOYMENT_BASE_IDL -#define DEPLOYMENT_BASE_IDL - -#include <orb.idl> - -module Deployment { - - struct Property - { - string name; - any value; - }; - typedef sequence < Property > Properties; - - struct Requirement { - string resourceType; - string name; - Properties property; - }; - typedef sequence < Requirement > Requirements; - - enum SatisfierPropertyKind { - Quantity, - Capacity, - Minimum, - Maximum, - _Attribute, - Selection - }; - - struct SatisfierProperty { - string name; - SatisfierPropertyKind kind; - boolean dynamic; - any value; - }; - typedef sequence < SatisfierProperty > SatisfierProperties; -}; - -#endif /* DEPLOYMENT_BASE_IDL */ diff --git a/CIAO/ciao/Deployment_Connection.idl b/CIAO/ciao/Deployment_Connection.idl deleted file mode 100644 index e8908eaeaba..00000000000 --- a/CIAO/ciao/Deployment_Connection.idl +++ /dev/null @@ -1,43 +0,0 @@ -// $Id$ - -#if !defined (DEPLOYMENT_CONNECTION_IDL) -#define DEPLOYMENT_CONNECTION_IDL - -#include "Deployment_Data.idl" -#include <ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl> - -// *************** Packaging and Deployment *************** -module Deployment -{ - typedef sequence < Object > Endpoints; - //typedef Object Endpoint; - - // CIAO's specific <Connection> type defition. - // To avoid the connection info in the plan being passed to the - // local node and to make the implementation not very cumbersome - // I changed the connection struct to include some extra informations. - struct Connection - { - string instanceName; - string portName; - CCMComponentPortKind kind; - - string endpointInstanceName; // CIAO specific extension - string endpointPortName; // CIAO specific extension - - // the endpoints member is change to endpoint. - // Since we will not have more than 1 objref in there. - Object endpoint; - - // A wrapper facade interface to provision different event - // communication mechanisms, including RTEC, etc. - CIAO::CIAO_Event_Service event_service; - - // The properties of this connection, particularly useful - // to speicfy QoS properties of pub/sub service connections. - Properties config; - }; - - typedef sequence < Connection > Connections; -}; -#endif /* DEPLOYMENT_CONNECTION_IDL */ diff --git a/CIAO/ciao/Deployment_Core.idl b/CIAO/ciao/Deployment_Core.idl deleted file mode 100644 index cbdadb08c93..00000000000 --- a/CIAO/ciao/Deployment_Core.idl +++ /dev/null @@ -1,232 +0,0 @@ -// $Id$ - -#if !defined (DEPLOYMENT_CORE_IDL) -#define DEPLOYMENT_CORE_IDL - -#include "CCM_Component.idl" -#include "Deployment_TargetData.idl" -#include "Deployment_Data.idl" -#include "Deployment_Application.idl" - -// *************** Packaging and Deployment *************** -module Deployment -{ - // Typeprefix Components "omg.org"; - // OMG threw these things away, didn't it. - - exception UnknownImplId - { - string name; - string reason; - }; - - exception InvalidLocation {}; - exception InstallationFailure - { - string name; - string reason; - }; - exception ImplEntryPointNotFound - { - string name; - string reason; - }; - - //Below are from the OMG Deployment.idl - - exception StopError { - string name; - string reason; - }; - - //======================================= - struct ComponentImplementationInfo - { - string component_instance_name; - string executor_dll; - string executor_entrypt; - string servant_dll; - string servant_entrypt; - Properties component_config; - // Properties home_config; //ignored for now. - }; - - typedef sequence <ComponentImplementationInfo> ComponentImplementationInfos; - - // ContainerImplementationInfo contains a list of components to be installed and - // policy configuration for the container which hosts these components - struct ContainerImplementationInfo - { - ComponentImplementationInfos impl_infos; - Properties container_config; - }; - - typedef sequence <ContainerImplementationInfo> ContainerImplementationInfos; - - struct NodeImplementationInfo - { - ContainerImplementationInfos impl_infos; - Properties nodeapp_config; - }; - - struct Component_Info - { - string component_instance_name; - Components::CCMObject component_ref; - }; - - typedef sequence < Component_Info > ComponentInfos; - - // @@ (OO) You're altering an OMG defined interface below. In - // order to avoid confusion, it is probably better to create - // another NodeApplication interface in the CIAO namespace - // that inherits from Deployment::NodeApplication. You'd - // then use the CIAO::NodeApplication in your - // implementation. - // - // Alternatively, you should at least place a CIAO-specific - // typeprefix within your altered NodeApplication interface - // to prevent interoperability issues. - - interface NodeApplication; // Forward decl. - typedef sequence<NodeApplication> NodeApplications; - - /// CIAO specific interface, which could deal with installing multiple - /// containers into a single NodeApplication. - interface Container - { - readonly attribute ::Deployment::Properties properties; - - /// Get the NodeApplication which created us - NodeApplication get_node_application (); - - /// Initialize the container with policies - // long init (in ::CORBA::PolicyList policies); - - // NW: The following should be component specific info because the - // container has already been created and initialized at this - // time. So there's not much container configuration to be done - // at this stage. - //@@ The container_impl_info will contain - //1 component instance name as the key. - //2 dll/so name of the exec - //3 entry point of the exec - //4 dll/so name of the svnt - //5 entry point of the svnt - //6 Poosible other configuration for container/home/component - - /// Install all homes and components - Deployment::ComponentInfos install (in ContainerImplementationInfo container_impl_info) - raises (UnknownImplId, - ImplEntryPointNotFound, - InstallationFailure, - ::Components::InvalidConfiguration); - - /// Remove all homes and components - void remove () - raises (::Components::RemoveFailure); - - /// Remove a component instance - void remove_component (in string inst_name) - raises (::Components::RemoveFailure); - }; - - typedef sequence<Container> Containers; - typedef sequence<CIAO::CIAO_Event_Service> CIAO_Event_Services; - - /// CIAO specific extension - /// This struct captures the installation information of a particular - /// CIAO_Event_Service, as defined in <ciaosvcs/Events/CIAO_Events.idl> - struct ESInstallationInfo - { - string id; - CIAO::EventServiceType type; - string svcconf; - //Properties es_config; - }; - - /// CIAO specific extension - typedef sequence<ESInstallationInfo> ESInstallationInfos; - - interface NodeApplication : Application - { - readonly attribute ::Deployment::Properties properties; - - /// CIAO specific operation to handle dynamic system redeployment - /// and reconfiguration - /// @@ Initialize the nodeapplication, so it will know what - /// components it will create and home many of them are - /// there. However the real create action will take place when - /// start launch is called on NodeApplicationManager. - long init (); - - /// @@ This operation will be called by NodeApplicationManager - /// client to really start to create homes and components. - ComponentInfos install (in NodeImplementationInfo node_impl_info) - raises (UnknownImplId, - ImplEntryPointNotFound, - InstallationFailure, - ::Components::InvalidConfiguration, - ::Components::RemoveFailure); - - /// CIAO specific extension - /// This operation will create one or more CIAO_Event_Service objects - /// within the NodeApplication, which will be used to mediate the - /// communication of CCM events - CIAO_Event_Services install_es (in ESInstallationInfos es_infos) - raises (InstallationFailure); - - /// CIAO specific extensions - ///@@ We know that Deployment::NodeApplicationManager will be returned, - /// however to avoid the size of the shared object of CIAO_Server. - /// we return an Object. - Object get_node_application_manager (); - - /// CIAO specific extension - Container create_container (in ::Deployment::Properties properties) - raises (::Components::CreateFailure, - ::Components::InvalidConfiguration); - - /// CIAO specific extension - void remove_container (in Container cref) - raises (::Components::RemoveFailure); - - /// CIAO specific extension - Containers get_containers (); - - /// CIAO specific extension - /// Remove a component instance from the NodeApplication - void remove_component (in string inst_name) - raises (::Components::RemoveFailure); - - /// CIAO specific extensions - /// Activate a component instance from the NodeApplication - void activate_component (in string inst_name) - raises (::Deployment::StartError); - - /// CIAO specific extensions - /// Passivate a component instance from the NodeApplication - void passivate_component (in string inst_name) - raises (::Components::RemoveFailure); - - /// Remove all containers, components and component homes. - /// Shuts down the ORB of the NodeApplication to terminate the process. - oneway void remove (); - - /// CIAO specific extension. This will enforce the component to - /// be activated (preactivate, activate, postactivated) before the assembly - /// is established - void ciao_preactivate () - raises (StartError); - - /// CIAO specific extension - void ciao_postactivate () - raises (StartError); - - /// CIAO specific extension - void ciao_passivate () - raises (StopError); - }; - -}; -#endif /* DEPLOYMENT_CORE_IDL */ diff --git a/CIAO/ciao/Deployment_Data.idl b/CIAO/ciao/Deployment_Data.idl deleted file mode 100644 index a6ea27638ca..00000000000 --- a/CIAO/ciao/Deployment_Data.idl +++ /dev/null @@ -1,223 +0,0 @@ -// $Id$ - -#ifndef DEPLOYMENT_DATA_IDL -#define DEPLOYMENT_DATA_IDL -#include "Deployment_Base.idl" - -module Deployment { - - enum CCMComponentPortKind - { - Facet, - SimplexReceptacle, - MultiplexReceptacle, - EventEmitter, - EventPublisher, - EventConsumer - }; - - struct ComponentPortDescription { - string name; - string specificType; - ::CORBA::StringSeq supportedType; - boolean provider; - boolean exclusiveProvider; - boolean exclusiveUser; - boolean optional; - CCMComponentPortKind kind; - }; - - typedef sequence < ComponentPortDescription > ComponentPortDescriptions; - - struct ComponentPropertyDescription { - string name; - CORBA::TypeCode type; - }; - - typedef sequence < ComponentPropertyDescription > ComponentPropertyDescriptions; - - struct ComponentInterfaceDescription { - string label; - string UUID; - string specificType; - ::CORBA::StringSeq supportedType; - ::CORBA::StringSeq idlFile; - Properties configProperty; - ComponentPortDescriptions port; - ComponentPropertyDescriptions property; - Properties infoProperty; - }; - - struct MonolithicDeploymentDescription { - string name; - ::CORBA::StringSeq source; - ::CORBA::ULongSeq artifactRef; - Properties execParameter; - Requirements deployRequirement; - }; - - typedef sequence < MonolithicDeploymentDescription > MonolithicDeploymentDescriptions; - - enum ResourceUsageKind { - None, - InstanceUsesResource, - ResourceUsesInstance, - PortUsesResource, - ResourceUsesPort - }; - - struct InstanceResourceDeploymentDescription { - ResourceUsageKind resourceUsage; - string requirementName; - string resourceName; - Properties property; - }; - - typedef sequence < InstanceResourceDeploymentDescription > InstanceResourceDeploymentDescriptions; - - struct InstanceDeploymentDescription { - string name; - string node; - ::CORBA::StringSeq source; - unsigned long implementationRef; - Properties configProperty; - InstanceResourceDeploymentDescriptions deployedResource; - InstanceResourceDeploymentDescriptions deployedSharedResource; - }; - - typedef sequence < InstanceDeploymentDescription > InstanceDeploymentDescriptions; - - struct ComponentExternalPortEndpoint { - string portName; - }; - - typedef sequence < ComponentExternalPortEndpoint > ComponentExternalPortEndpoints; - - struct PlanSubcomponentPortEndpoint { - string portName; - boolean provider; - CCMComponentPortKind kind; - unsigned long instanceRef; - }; - - typedef sequence < PlanSubcomponentPortEndpoint > PlanSubcomponentPortEndpoints; - - struct ExternalReferenceEndpoint { - string location; - }; - - typedef sequence < ExternalReferenceEndpoint > ExternalReferenceEndpoints; - - struct ConnectionResourceDeploymentDescription { - string targetName; - string requirementName; - string resourceName; - Properties property; - }; - - typedef sequence < ConnectionResourceDeploymentDescription > ConnectionResourceDeploymentDescriptions; - - struct PlanConnectionDescription { - string name; - ::CORBA::StringSeq source; - Requirements deployRequirement; - ComponentExternalPortEndpoints externalEndpoint; - PlanSubcomponentPortEndpoints internalEndpoint; - ExternalReferenceEndpoints externalReference; - ConnectionResourceDeploymentDescriptions deployedResource; - }; - - typedef sequence < PlanConnectionDescription > PlanConnectionDescriptions; - - struct PlanSubcomponentPropertyReference { - string propertyName; - unsigned long instanceRef; - }; - - typedef sequence < PlanSubcomponentPropertyReference > PlanSubcomponentPropertyReferences; - - struct PlanPropertyMapping { - string name; - ::CORBA::StringSeq source; - string externalName; - PlanSubcomponentPropertyReferences delegatesTo; - }; - - typedef sequence < PlanPropertyMapping > PlanPropertyMappings; - - struct ImplementationDependency { - string requiredType; - }; - - typedef sequence < ImplementationDependency > ImplementationDependencies; - - struct ResourceDeploymentDescription { - string requirementName; - string resourceName; - Properties property; - }; - - typedef sequence < ResourceDeploymentDescription > ResourceDeploymentDescriptions; - - struct ArtifactDeploymentDescription { - string name; - ::CORBA::StringSeq location; - string node; - ::CORBA::StringSeq source; - Properties execParameter; - Requirements deployRequirement; - ResourceDeploymentDescriptions deployedResource; - }; - - typedef sequence < ArtifactDeploymentDescription > ArtifactDeploymentDescriptions; - - struct DeploymentPlan { - string label; - string UUID; - ComponentInterfaceDescription realizes; - MonolithicDeploymentDescriptions implementation; - InstanceDeploymentDescriptions instance; - PlanConnectionDescriptions connection; - PlanPropertyMappings externalProperty; - ImplementationDependencies dependsOn; - ArtifactDeploymentDescriptions artifact; - Properties infoProperty; - }; - - struct ComponentPackageReference { - string requiredUUID; - string requiredName; - string requiredType; - }; - - typedef sequence < ComponentPackageReference > ComponentPackageReferences; - - typedef sequence < ResourceUsageKind > ResourceUsageKinds; - - struct ImplementationRequirement { - ResourceUsageKinds resourceUsage; - string resourcePort; - string componentPort; - string resourceType; - string name; - Properties property; - }; - - typedef sequence < ImplementationRequirement > ImplementationRequirements; - - struct Capability { - string name; - ::CORBA::StringSeq resourceType; - SatisfierProperties property; - }; - - typedef sequence < Capability > Capabilities; - - struct RequirementSatisfier { - string name; - ::CORBA::StringSeq resourceType; - SatisfierProperties property; - }; -}; - -#endif /* DEPLOYMENT_DATA_IDL */ diff --git a/CIAO/ciao/Deployment_Events.idl b/CIAO/ciao/Deployment_Events.idl deleted file mode 100644 index 1d4d431287c..00000000000 --- a/CIAO/ciao/Deployment_Events.idl +++ /dev/null @@ -1,68 +0,0 @@ -// $Id$ - -/** - * @file Deployment_Events.idl - * - * @brief A collection of IDL data types for CIAO pub/sub services deployment. - * - * @author Gan Deng - */ - -#if !defined (CIAO_DEPLOYMENT_EVENT_SERVICES_IDL) -#define CIAO_DEPLOYMENT_EVENT_SERVICES_IDL - -#include <orb.idl> - -module CIAO -{ - module DAnCE - { - /// CIAO specific extension to describe pub/sub services in the deployment - enum EventServiceType - { - EC, - RTEC, - NOTIFY, - RTNOTIFY - }; - - /// Each element in the EventSourceSet denotes a event source id - typedef string EventSourceId; - - typedef sequence<EventSourceId> EventSourceSet; - - /// Event Filters - enum FilterType - { - CONJUNCTION, - DISJUNCTION, - LOGICAL_AND, - NEGATE - }; - - struct EventFilter - { - string name; - FilterType type; - EventSourceSet sources; - }; - - typedef sequence < EventFilter > EventFilters; - - /// CIAO specific extension to describe pub/sub services in the deployment - struct EventServiceDeploymentDescription - { - string name; - string node; - EventServiceType type; - string svc_cfg_file; - - EventFilters filters; - }; - - typedef sequence < EventServiceDeploymentDescription > - EventServiceDeploymentDescriptions; - }; -}; - -#endif /* CIAO_DEPLOYMENT_EVENT_SERVICES_IDL */ diff --git a/CIAO/ciao/Deployment_TargetData.idl b/CIAO/ciao/Deployment_TargetData.idl deleted file mode 100644 index 09af2acddc4..00000000000 --- a/CIAO/ciao/Deployment_TargetData.idl +++ /dev/null @@ -1,62 +0,0 @@ -//$Id$ - -#ifndef DEPLOYMENT_TARGETDATA_IDL -#define DEPLOYMENT_TARGETDATA_IDL - -#include "ciao/Deployment_Base.idl" - -module Deployment { - - struct Resource { - string name; - ::CORBA::StringSeq resourceType; - SatisfierProperties property; - }; - typedef sequence < Resource > Resources; - - struct SharedResource { - string name; - ::CORBA::StringSeq resourceType; - ::CORBA::ULongSeq nodeRef; - SatisfierProperties property; - }; - typedef sequence < SharedResource > SharedResources; - - struct Node { - string name; - string label; - ::CORBA::ULongSeq sharedResourceRef; - ::CORBA::ULongSeq connectionRef; - Resources resource; - }; - typedef sequence < Node > Nodes; - - struct Interconnect { - string name; - string label; - ::CORBA::ULongSeq connectionRef; - ::CORBA::ULongSeq connectRef; - Resources resource; - }; - typedef sequence < Interconnect > Interconnects; - - struct Bridge { - string name; - string label; - ::CORBA::ULongSeq connectRef; - Resources resource; - }; - typedef sequence < Bridge > Bridges; - - struct Domain { - string UUID; - string label; - SharedResources sharedResource; - Nodes node; - Interconnects interconnect; - Bridges bridge; - Properties infoProperty; - }; -}; - -#endif /* DEPLOYMENT_TARGETDATA_IDL */ diff --git a/CIAO/ciao/Deployment_common.h b/CIAO/ciao/Deployment_common.h deleted file mode 100644 index 725b6afd953..00000000000 --- a/CIAO/ciao/Deployment_common.h +++ /dev/null @@ -1,54 +0,0 @@ -// $Id$ - -/** - * @file Deployment_common.h - * - * This file collects common type definitions used across different - * objects of DAnCE toolchain. - * - * @author Gan Deng <dengg@dre.vanderbilt.edu> - */ - -#ifndef DANCE_COMMON_H -#define DANCE_COMMON_H -#include /**/ "ace/pre.h" - -#include "ace/config-all.h" - -#if !defined ACE_LACKS_PRAGMA_ONCE -#pragma once -#endif /* ! ACE_LACKS_PRAGMA_ONCE */ - -/// A struct which captures the binding information about a component - -namespace CIAO -{ - /// A struct which captures the compnent binding information, which - /// is useful for inter-assembly connection setup - typedef struct _component_binding - { - _component_binding () - { - providedReference_ = 0; - } - - ACE_CString name_; - ACE_CString plan_uuid_; - ACE_CString node_; - - Deployment::Connections_var providedReference_; - - bool operator==(const struct _component_binding & comp) - { - if (this->name_ == comp.name_ && - this->plan_uuid_ == comp.plan_uuid_ && - this->node_ == comp.node_) - return true; - else - return false; - } - } Component_Binding_Info; -} - -#include /**/ "ace/post.h" -#endif /* DANCE_COMMON_H */ diff --git a/CIAO/ciao/Deployment_stub_export.h b/CIAO/ciao/Deployment_stub_export.h deleted file mode 100644 index 12985a68b5b..00000000000 --- a/CIAO/ciao/Deployment_stub_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 -s Deployment_stub -// ------------------------------ -#ifndef DEPLOYMENT_STUB_EXPORT_H -#define DEPLOYMENT_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (DEPLOYMENT_STUB_HAS_DLL) -# define DEPLOYMENT_STUB_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && DEPLOYMENT_STUB_HAS_DLL */ - -#if !defined (DEPLOYMENT_STUB_HAS_DLL) -# define DEPLOYMENT_STUB_HAS_DLL 1 -#endif /* ! DEPLOYMENT_STUB_HAS_DLL */ - -#if defined (DEPLOYMENT_STUB_HAS_DLL) && (DEPLOYMENT_STUB_HAS_DLL == 1) -# if defined (DEPLOYMENT_STUB_BUILD_DLL) -# define Deployment_stub_Export ACE_Proper_Export_Flag -# define DEPLOYMENT_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define DEPLOYMENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* DEPLOYMENT_STUB_BUILD_DLL */ -# define Deployment_stub_Export ACE_Proper_Import_Flag -# define DEPLOYMENT_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define DEPLOYMENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* DEPLOYMENT_STUB_BUILD_DLL */ -#else /* DEPLOYMENT_STUB_HAS_DLL == 1 */ -# define Deployment_stub_Export -# define DEPLOYMENT_STUB_SINGLETON_DECLARATION(T) -# define DEPLOYMENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* DEPLOYMENT_STUB_HAS_DLL == 1 */ - -// Set DEPLOYMENT_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (DEPLOYMENT_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define DEPLOYMENT_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define DEPLOYMENT_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !DEPLOYMENT_STUB_NTRACE */ - -#if (DEPLOYMENT_STUB_NTRACE == 1) -# define DEPLOYMENT_STUB_TRACE(X) -#else /* (DEPLOYMENT_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define DEPLOYMENT_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (DEPLOYMENT_STUB_NTRACE == 1) */ - -#endif /* DEPLOYMENT_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/Deployment_svnt_export.h b/CIAO/ciao/Deployment_svnt_export.h deleted file mode 100644 index e403dbf0c41..00000000000 --- a/CIAO/ciao/Deployment_svnt_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 -s Deployment_svnt -// ------------------------------ -#ifndef DEPLOYMENT_SVNT_EXPORT_H -#define DEPLOYMENT_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (DEPLOYMENT_SVNT_HAS_DLL) -# define DEPLOYMENT_SVNT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && DEPLOYMENT_SVNT_HAS_DLL */ - -#if !defined (DEPLOYMENT_SVNT_HAS_DLL) -# define DEPLOYMENT_SVNT_HAS_DLL 1 -#endif /* ! DEPLOYMENT_SVNT_HAS_DLL */ - -#if defined (DEPLOYMENT_SVNT_HAS_DLL) && (DEPLOYMENT_SVNT_HAS_DLL == 1) -# if defined (DEPLOYMENT_SVNT_BUILD_DLL) -# define Deployment_svnt_Export ACE_Proper_Export_Flag -# define DEPLOYMENT_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define DEPLOYMENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* DEPLOYMENT_SVNT_BUILD_DLL */ -# define Deployment_svnt_Export ACE_Proper_Import_Flag -# define DEPLOYMENT_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define DEPLOYMENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* DEPLOYMENT_SVNT_BUILD_DLL */ -#else /* DEPLOYMENT_SVNT_HAS_DLL == 1 */ -# define Deployment_svnt_Export -# define DEPLOYMENT_SVNT_SINGLETON_DECLARATION(T) -# define DEPLOYMENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* DEPLOYMENT_SVNT_HAS_DLL == 1 */ - -// Set DEPLOYMENT_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (DEPLOYMENT_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define DEPLOYMENT_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define DEPLOYMENT_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !DEPLOYMENT_SVNT_NTRACE */ - -#if (DEPLOYMENT_SVNT_NTRACE == 1) -# define DEPLOYMENT_SVNT_TRACE(X) -#else /* (DEPLOYMENT_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define DEPLOYMENT_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (DEPLOYMENT_SVNT_NTRACE == 1) */ - -#endif /* DEPLOYMENT_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/CIAO/ciao/DomainApplicationManager.idl b/CIAO/ciao/DomainApplicationManager.idl deleted file mode 100644 index fa21d64d39f..00000000000 --- a/CIAO/ciao/DomainApplicationManager.idl +++ /dev/null @@ -1,58 +0,0 @@ -// $Id$ -#ifndef DOMAINAPPLICATIONMANAGER_IDL -#define DOMAINAPPLICATIONMANAGER_IDL - -#include "Deployment.idl" -#include "Deployment_Core.idl" - -module Deployment { - /// CIAO 's DomainApplicationManager interface differs spec-defined interface - /// in the same that it also integrates the spec-defined interface for - /// DomainApplication into itself - interface DomainApplicationManager - { - DeploymentPlan getPlan (); - - /// CIAO specific version of startLaunch implementation, this one - /// differs with spec-defined operation in the sense that it doesn't - /// return DomainApplication object reference. - void startLaunch (in Properties configProperty, in boolean start) - raises (ResourceNotAvailable, StartError, InvalidProperty); - - void finishLaunch (in boolean start, - in boolean is_ReDAC) - raises (StartError, InvalidConnection); - - void start () - raises (StartError); - - /// CIAO specific extention - /// Fetch NodeApplication based on the given node name - NodeApplication get_node_app (in string node_name) - raises (NoSuchName); - - /// CIAO specific extension, it differs with the spec defined one - /// for no input parameter. - void destroyApplication () - raises (StopError); - - /// CIAO specific extension to destroy NodeApplicationManager - void destroyManager () - raises (StopError); - - /// CIAO specific extension - /// Perform the actual redeployment and reconfiguration on the dommain level. - void perform_redeployment (in DeploymentPlan new_plan) - raises (PlanError, - InstallationFailure, - UnknownImplId, - ImplEntryPointNotFound, - InvalidConnection, - InvalidProperty, - ::Components::RemoveFailure); - }; - - typedef sequence < DomainApplicationManager > DomainApplicationManagers; -}; - -#endif /* DOMAINAPPLICATIONMANAGER_IDL */ diff --git a/CIAO/ciao/Dynamic_Component_Activator.cpp b/CIAO/ciao/Dynamic_Component_Activator.cpp deleted file mode 100644 index 11883fc6056..00000000000 --- a/CIAO/ciao/Dynamic_Component_Activator.cpp +++ /dev/null @@ -1,70 +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_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::ForwardRequest)) - { - Dynamic_Component_Servant_Base* servant = 0; - PortableServer::ObjectId new_oid (oid); - - if (this->servant_map_.find (oid, servant) == 0) - { - return servant->create (new_oid); - } - - return 0; - } - - void - Dynamic_Component_Activator::etherealize ( - const PortableServer::ObjectId &, - PortableServer::POA_ptr , - PortableServer::Servant , - CORBA::Boolean , - CORBA::Boolean - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - } - - void Dynamic_Component_Activator::add_servant_map - (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant) - { - this->servant_map_.bind (oid, servant); - } - - void Dynamic_Component_Activator::delete_servant_map - (PortableServer::ObjectId &oid) - { - Dynamic_Component_Servant_Base* servant = 0; - if (this->servant_map_.unbind (oid, servant) != 0) - { - ACE_DEBUG ((LM_DEBUG, "Invalid object reference\n")); - return; - } - - return; - } -} diff --git a/CIAO/ciao/Dynamic_Component_Activator.h b/CIAO/ciao/Dynamic_Component_Activator.h deleted file mode 100644 index a8d0b26549a..00000000000 --- a/CIAO/ciao/Dynamic_Component_Activator.h +++ /dev/null @@ -1,106 +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 "ciao/CIAO_Server_Export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/CCM_ContainerC.h" -#include "ciao/Deployment_CoreC.h" -#include "ciao/Dynamic_Component_Servant_Base.h" - -#include "tao/PortableServer/Key_Adapters.h" -#include "tao/PortableServer/PortableServer.h" -#include "tao/LocalObject.h" -#include "tao/PortableServer/ServantActivatorC.h" - -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Array_Base.h" - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -namespace CIAO -{ - - class Dynamic_Component_Servant_Base; - /** - * @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)); - - void add_servant_map (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant); - - void delete_servant_map (PortableServer::ObjectId &oid); - - private: - /// Pointer to our ORB - CORBA::ORB_var orb_; - - 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/CIAO/ciao/Dynamic_Component_Servant_Base.cpp b/CIAO/ciao/Dynamic_Component_Servant_Base.cpp deleted file mode 100644 index 16a9f40ea3a..00000000000 --- a/CIAO/ciao/Dynamic_Component_Servant_Base.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "Dynamic_Component_Servant_Base.h" -#include "CIAO_common.h" -#include "ace/Log_Msg.h" -#include "ace/OS_NS_string.h" - -ACE_RCSID (ciao, - Dynamic_Component_Servant_Base, - "$Id$") - -namespace CIAO -{ - Dynamic_Component_Servant_Base::Dynamic_Component_Servant_Base (void) - : container_ (0) - { - 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/Dynamic_Component_Servant_Base.h b/CIAO/ciao/Dynamic_Component_Servant_Base.h deleted file mode 100644 index 0e826cf40ab..00000000000 --- a/CIAO/ciao/Dynamic_Component_Servant_Base.h +++ /dev/null @@ -1,55 +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/CIAO_Server_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_SERVER_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 - ACE_ENV_ARG_DECL_WITH_DEFAULTS) = 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/Dynamic_Component_Servant_T.cpp b/CIAO/ciao/Dynamic_Component_Servant_T.cpp deleted file mode 100644 index c37f9763076..00000000000 --- a/CIAO/ciao/Dynamic_Component_Servant_T.cpp +++ /dev/null @@ -1,96 +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 - ACE_ENV_ARG_DECL) - { - CIAO::Swap_Exec_var swap_exec = - CIAO::Swap_Exec::_narrow (this->executor_.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::EnterpriseComponent_var ciao_ec = - swap_exec->incarnate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - typedef typename COMP_SVNT::_exec_type exec_type; - typename COMP_SVNT::_exec_type::_var_type ciao_comp = - exec_type::_narrow (ciao_ec.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - /// @@ 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) - { - // svt->ciao_preactivate (); - // svt->ciao_activate (); - // svt->ciao_postactivate (); - 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/Dynamic_Component_Servant_T.h b/CIAO/ciao/Dynamic_Component_Servant_T.h deleted file mode 100644 index 29f9f801707..00000000000 --- a/CIAO/ciao/Dynamic_Component_Servant_T.h +++ /dev/null @@ -1,87 +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 "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 - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - - 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>, - ACE_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/ExecutionManager.idl b/CIAO/ciao/ExecutionManager.idl deleted file mode 100644 index a5108b77281..00000000000 --- a/CIAO/ciao/ExecutionManager.idl +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ -#ifndef EXECUTIONMANAGER_IDL -#define EXECUTIONMANAGER_IDL - -#include "Deployment.idl" -#include "DomainApplicationManager.idl" - -module Deployment { - interface ExecutionManager { - DomainApplicationManager preparePlan (in DeploymentPlan plan, - in boolean commitResources) - raises (ResourceNotAvailable, PlanError, StartError); - - DomainApplicationManagers getManagers (); - - DomainApplicationManager getManager (in string plan_uuid) - raises (PlanNotExist); - - void destroyManager (in DomainApplicationManager manager) - raises (StopError); - - /// CIAO specific extention - /// Destroy ApplicationManagers by plan_uuid, the unique semantics of this - /// operation lies in the fact that if some components are - /// still up and running, then the ApplicationManagers won't be destroyed. - void destroyManagerByPlan (in string plan_uuid) - raises (StopError); - - /// CIAO specific extention - /// "Get" operation, return the DeploymentPlan - DeploymentPlan getPlan (in string plan_uuid); - - /// CIAO specific operation to handle dynamic system redeployment - /// and reconfiguration - /// This operation could handle dynamic redeployment, and this - /// is the operation exposed to clients directly. Other - /// "perform_redeployment" operation defined on DAM and NA - /// are implementaion details within DAnCE. - void perform_redeployment (in DeploymentPlan new_plan) - raises (PlanError, - InstallationFailure, - UnknownImplId, - ImplEntryPointNotFound, - InvalidConnection, - InvalidProperty, - ::Components::RemoveFailure); - }; -}; - -#endif /* EXECUTIONMANAGER_IDL */ diff --git a/CIAO/ciao/Home_Servant_Impl_Base.cpp b/CIAO/ciao/Home_Servant_Impl_Base.cpp deleted file mode 100644 index 81c62eb6110..00000000000 --- a/CIAO/ciao/Home_Servant_Impl_Base.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ - -#include "Home_Servant_Impl_Base.h" - -namespace CIAO -{ - Home_Servant_Impl_Base::Home_Servant_Impl_Base (Session_Container * c) - : container_ (c) - { - } - - Home_Servant_Impl_Base::~Home_Servant_Impl_Base (void) - { - } - - // Operations for CCMHome interface. - - CORBA::IRObject_ptr - Home_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 - Home_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/CIAO/ciao/Home_Servant_Impl_Base.h b/CIAO/ciao/Home_Servant_Impl_Base.h deleted file mode 100644 index 848259f72d5..00000000000 --- a/CIAO/ciao/Home_Servant_Impl_Base.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Home_Servant_Impl_Base.h - * - * $Id$ - * - * This file contains the non-template declaration of a base class for - * the template mixin for the generated home servant class. - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_HOME_SERVANT_IMPL_BASE_H -#define CIAO_HOME_SERVANT_IMPL_BASE_H - -#include /**/ "ace/pre.h" - -#include "CCM_HomeS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Server_Export.h" - -namespace CIAO -{ - class Session_Container; - - /** - * @class Home_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 Home_Servant_Impl_Base - : public virtual POA_Components::CCMHome - { - public: - Home_Servant_Impl_Base (Session_Container * c); - - virtual ~Home_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)); - - virtual void - update_component_map (PortableServer::ObjectId &oid) = 0; - - protected: - Session_Container *container_; - private: - /// Not to be used - Home_Servant_Impl_Base (void); - }; -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_HOME_SERVANT_IMPL_BASE_H */ diff --git a/CIAO/ciao/Home_Servant_Impl_T.cpp b/CIAO/ciao/Home_Servant_Impl_T.cpp deleted file mode 100644 index 12ce1132f10..00000000000 --- a/CIAO/ciao/Home_Servant_Impl_T.cpp +++ /dev/null @@ -1,256 +0,0 @@ -// $Id$ - -#ifndef CIAO_HOME_SERVANT_IMPL_T_C -#define CIAO_HOME_SERVANT_IMPL_T_C - -#include "Home_Servant_Impl_T.h" -#include "CIAO_common.h" - -namespace CIAO -{ - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::Home_Servant_Impl ( - typename EXEC::_ptr_type exe, - Session_Container * c, - const char *ins_name - ) - : Home_Servant_Impl_Base (c), - ins_name_ (ins_name), - executor_ (EXEC::_duplicate (exe)) - { - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::~Home_Servant_Impl (void) - { - CIAO_TRACE ("Home_Servant_Impl<>::destructor"); - - const OBJ_ITERATOR end = this->objref_map_.end (); - - for (OBJ_ITERATOR iter = this->objref_map_.begin (); - iter != end; - ++iter) - { - this->remove_component (((*iter).int_id_).in ()); - } - } - - // Operations for CCMHome interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::remove_component ( - ::Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) - { - CIAO_TRACE ("Home_Servant_Impl<>::remove_component"); - - PortableServer::ObjectId_var oid = - this->container_->the_POA ()->reference_to_id (comp - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - Components::CCMObject_var ccm_obj_var = Components::CCMObject::_nil (); - if (objref_map_.find (oid.in (), ccm_obj_var) != 0) - { - ACE_DEBUG ((LM_DEBUG, "Invalid component object reference\n")); - return; - } - - typedef typename COMP_SVNT::_stub_type stub_type; - typename COMP_SVNT::_stub_var_type _ciao_comp = - stub_type::_narrow (ccm_obj_var.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (CORBA::is_nil (_ciao_comp.in ())) - { - ACE_THROW (Components::RemoveFailure ()); - } - - _ciao_comp->remove (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - if (CIAO::debug_level () > 3) - { - ACE_DEBUG ((LM_DEBUG, "removed the component\n")); - } - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::update_component_map ( - PortableServer::ObjectId &oid) - { - CIAO_TRACE ("update_component_map"); - - Components::CCMObject_var ccm_obj_ptr; - if (objref_map_.unbind (oid, ccm_obj_ptr) != 0) - { - ACE_DEBUG ((LM_DEBUG, "Invalid component object reference\n")); - return; - } - - return; - } - - // Operations for keyless home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - Components::CCMObject_ptr - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::create_component ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) - { - CIAO_TRACE ("Home_Servant_Impl<>::create_component"); - - return this->create (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - // Operations for implicit home interface. - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - typename COMP_SVNT::_stub_ptr_type - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::create ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)) - { - CIAO_TRACE ("Home_Servant_Impl<>::create"); - - if (this->executor_.in () == 0) - { - ACE_THROW_RETURN (CORBA::INTERNAL (), - COMP_SVNT::_stub_type::_nil ()); - } - - ::Components::EnterpriseComponent_var _ciao_ec = - this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP::_nil ()); - - typedef typename COMP_SVNT::_exec_type exec_type; - typename COMP_SVNT::_exec_type::_var_type _ciao_comp = - exec_type::_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 COMP_SVNT> - typename COMP_SVNT::_stub_ptr_type - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::_ciao_activate_component ( - typename COMP_SVNT::_exec_type::_ptr_type exe - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Home_Servant_Impl<>::_ciao_activate_component"); - - CORBA::Object_var hobj = - this->container_->get_objref (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - Components::CCMHome_var home = - Components::CCMHome::_narrow (hobj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - typedef typename COMP_SVNT::_stub_type stub_type; - COMP_SVNT *svt = 0; - ACE_NEW_RETURN (svt, - COMP_SVNT (exe, - home.in (), - this->ins_name_, - this, - this->container_), - stub_type::_nil ()); - - PortableServer::ServantBase_var safe (svt); - PortableServer::ObjectId_var oid; - - CORBA::Object_var objref = - this->container_->install_component (svt, - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - typedef typename COMP_SVNT::_stub_type stub_type; - typename COMP_SVNT::_stub_var_type ho = - stub_type::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - Components::CCMObject_var ccmobjref = - Components::CCMObject::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - this->objref_map_.bind ( - oid.in (), - Components::CCMObject::_duplicate (ccmobjref.in ())); - - return ho._retn (); - } - - template <typename BASE_SKEL, - typename EXEC, - typename COMP_SVNT> - void - Home_Servant_Impl<BASE_SKEL, - EXEC, - COMP_SVNT>::_ciao_passivate_component ( - typename COMP_SVNT::_stub_ptr_type comp - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CIAO_TRACE ("Home_Servant_Impl<>::_ciao_passivate_component"); - - PortableServer::ObjectId_var oid; - this->container_->uninstall_component (comp, - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} - -#endif /* CIAO_HOME_SERVANT_IMPL_T_C */ diff --git a/CIAO/ciao/Home_Servant_Impl_T.h b/CIAO/ciao/Home_Servant_Impl_T.h deleted file mode 100644 index 8d148dc193c..00000000000 --- a/CIAO/ciao/Home_Servant_Impl_T.h +++ /dev/null @@ -1,122 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Home_Servant_Impl_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated home servant class. - * - * @authors Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_HOME_SERVANT_IMPL_T_H -#define CIAO_HOME_SERVANT_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "Home_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 Session_Container; - - /** - * @class Home_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 Home_Servant_Impl - : public virtual BASE_SKEL, - public virtual Home_Servant_Impl_Base - { - public: - Home_Servant_Impl (typename EXEC::_ptr_type exe, - Session_Container * c, - const char *ins_name); - - virtual ~Home_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 typename COMP_SVNT::_stub_ptr_type - create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - - virtual void - update_component_map (PortableServer::ObjectId &oid); - - protected: - // CIAO-specific operations. - - typename COMP_SVNT::_stub_ptr_type - _ciao_activate_component (typename COMP_SVNT::_exec_type::_ptr_type exe - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - _ciao_passivate_component (typename COMP_SVNT::_stub_ptr_type comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - const char *ins_name_; - typename EXEC::_var_type executor_; - - typedef ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - Components::CCMObject_var, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_SYNCH_MUTEX> - OBJREF_MAP; - - typedef OBJREF_MAP::iterator OBJ_ITERATOR; - - OBJREF_MAP objref_map_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Home_Servant_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Home_Servant_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_HOME_SERVANT_IMPL_T_H */ diff --git a/CIAO/ciao/NodeApp_CB_Impl.cpp b/CIAO/ciao/NodeApp_CB_Impl.cpp deleted file mode 100644 index 24578aa664c..00000000000 --- a/CIAO/ciao/NodeApp_CB_Impl.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// $Id$ -#include "NodeApp_CB_Impl.h" - -CIAO::NodeApplication_Callback_Impl:: -NodeApplication_Callback_Impl (CORBA::ORB_ptr o, - PortableServer::POA_ptr p, - Deployment::NodeApplicationManager_ptr s, - const Deployment::Properties &properties) - ACE_THROW_SPEC ((CORBA::SystemException)) - : orb_ (CORBA::ORB::_duplicate (o)), - poa_ (PortableServer::POA::_duplicate (p)), - nam_ (Deployment::NodeApplicationManager::_duplicate (s)) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - //@@ Note: this properties is useless unless - // we have some specific properties for the callback obj. - Deployment::Properties * tmp = 0; - ACE_NEW_THROW_EX (tmp, - Deployment::Properties (properties), - CORBA::NO_MEMORY ()); - ACE_TRY_CHECK; - this->properties_ = tmp; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "NodeApp_CB_Impl::Constructor\t\n"); - ACE_RE_THROW; - } - ACE_ENDTRY; - ACE_CHECK; -} - -CIAO::NodeApplication_Callback_Impl::~NodeApplication_Callback_Impl () -{ -} - -PortableServer::POA_ptr -CIAO::NodeApplication_Callback_Impl::_default_POA (void) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} - -Deployment::NodeApplicationManager_ptr -CIAO::NodeApplication_Callback_Impl::register_node_application ( - Deployment::NodeApplication_ptr na, - Deployment::Properties_out properties - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - properties = this->properties_._retn (); - - this->nodeapp_ = Deployment::NodeApplication::_duplicate (na); - return Deployment::NodeApplicationManager::_duplicate (this->nam_.in ()); -} - -Deployment::NodeApplication_ptr -CIAO::NodeApplication_Callback_Impl::get_nodeapp_ref (void) -{ - // @@ (OO) How are you relinquishing ownership here? Since you're - // duplicating the reference you actually maintain - // ownership. Is the below comment wrong, or is the code - // wrong? - - // Relinquish the ownership of the nodeapplication reference. - //This method should only be called from the NodeApplicationManager. - return Deployment::NodeApplication::_duplicate (this->nodeapp_.in ()); -} diff --git a/CIAO/ciao/NodeApp_CB_Impl.h b/CIAO/ciao/NodeApp_CB_Impl.h deleted file mode 100644 index 824f3605d8f..00000000000 --- a/CIAO/ciao/NodeApp_CB_Impl.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- C++ -*- -// $Id$ -//============================================================================= -/** - * @file NodeApp_CB_Impl.h - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - * Tao Lu <lu@dre.vanderbilt.edu> - * - //===========================================================================*/ - - -#ifndef NODEAPPLICATION_CALLBACK_IMPL_H -#define NODEAPPLICATION_CALLBACK_IMPL_H -#include /**/ "ace/pre.h" - -#include "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "NodeApplication_CallBackS.h" - -namespace CIAO -{ - /** - * @class NodeApplication_Callback_Impl - * - * @brief A call back interface for NodeApplication - * @Note Here is no need to be thread safe since for every nodeapplication - * we will have an unique callback object. --Tao - */ - class Deployment_svnt_Export NodeApplication_Callback_Impl - : public virtual POA_CIAO::NodeApplication_Callback - { - public: - friend class NodeApplicationManager_Impl; - - /// Constructor. - NodeApplication_Callback_Impl (CORBA::ORB_ptr o, - PortableServer::POA_ptr p, - Deployment::NodeApplicationManager_ptr s, - const Deployment::Properties &properties) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Get the containing POA. This operation does *not* increase - /// the reference count of the POA. - virtual PortableServer::POA_ptr _default_POA (void); - - /// Record the NodeApplication reference returned by the newly - /// spawned NodeApplication and give it back a reference to - /// NodeApplicationManager - Deployment::NodeApplicationManager_ptr - register_node_application (Deployment::NodeApplication_ptr na, - Deployment::Properties_out properties - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - Deployment::NodeApplication_ptr get_nodeapp_ref (void); - - protected: - /// Destructor. - ~NodeApplication_Callback_Impl (); - - CORBA::ORB_var orb_; - - PortableServer::POA_var poa_; - - Deployment::NodeApplicationManager_var nam_; - - Deployment::NodeApplication_var nodeapp_; - - Deployment::Properties_var properties_; - }; -} - -#include /**/ "ace/post.h" -#endif /* NODEAPPLICATION_CALLBACK_IMPL_H */ diff --git a/CIAO/ciao/NodeApplicationManager.idl b/CIAO/ciao/NodeApplicationManager.idl deleted file mode 100644 index 6a3b8e42f8a..00000000000 --- a/CIAO/ciao/NodeApplicationManager.idl +++ /dev/null @@ -1,66 +0,0 @@ -// $Id$ -#ifndef NODEAPPLICATIONMANAGER_IDL -#define NODEAPPLICATIONMANAGER_IDL - -#include "Deployment_Core.idl" -#include "Deployment.idl" - -module Deployment { - interface ApplicationManager { - Application startLaunch (in Properties configProperty, - out Connections providedReference, - in boolean start) - raises (ResourceNotAvailable, StartError, InvalidProperty); - void destroyApplication (in Application app) - raises (StopError); - }; - - /** - * @struct Sched_Params - * @brief Carries Scheduling Params - * @description CIAO specific structure to carry the scheduling params - * to set the process, required by RACE - */ - struct Sched_Params - { - long policy_; - long priority_; - long scope_; - long msec_; - }; - - - interface NodeApplicationManager : - ApplicationManager - { - /// CIAO specific operation to handle dynamic system redeployment - /// and reconfiguration - /// This operation could handle dynamic redeployment for - /// a node-level deployment plan within a node - /// @para add_or_remove If true, we add new components only, vice vesa. - Application perform_redeployment (in Properties configProperty, - out Connections providedReference, - in boolean add_or_remove, - in boolean start) - raises (PlanError, - InstallationFailure, - UnknownImplId, - ImplEntryPointNotFound, - InvalidConnection, - InvalidProperty, - ::Components::RemoveFailure); - - /// CIAO specific operation to reset deployment plan - void reset_plan (in DeploymentPlan plan); - - /// CIAO speicfic operation to set the information of - /// "shared components" (through NodeManager) - void set_shared_components (in ComponentPlans components); - - /// CIAO specific function to set priority - /// o component , required by RACE - long set_priority (in string cid , in Sched_Params params); - }; -}; - -#endif /* NODEAPPLICATIONMANAGER_IDL */ diff --git a/CIAO/ciao/NodeApplication_CallBack.idl b/CIAO/ciao/NodeApplication_CallBack.idl deleted file mode 100644 index d0f8daeb42e..00000000000 --- a/CIAO/ciao/NodeApplication_CallBack.idl +++ /dev/null @@ -1,23 +0,0 @@ -// $Id$ - -/** - * This IDL file is used to combine the NodeApplication - * interface with the NodeApplicationManager interface. - * - * NodeApplicationManager will be spawn NodeApplication. - * The call back object will be used to get the objectref of - * NodeApplication. - */ - -#include "Deployment.idl" -#include "NodeApplicationManager.idl" - -module CIAO -{ - interface NodeApplication_Callback - { - Deployment::NodeApplicationManager - register_node_application (in Deployment::NodeApplication na, - out Deployment::Properties properties); - }; -}; diff --git a/CIAO/ciao/NodeManager.idl b/CIAO/ciao/NodeManager.idl deleted file mode 100644 index 318cea79aed..00000000000 --- a/CIAO/ciao/NodeManager.idl +++ /dev/null @@ -1,58 +0,0 @@ -// $Id$ -#ifndef NODEMANAGER_IDL -#define NODEMANAGER_IDL - -#include "Deployment.idl" -#include "Deployment_Core.idl" -#include "TargetManager.idl" - -module Deployment { - - interface Logger { - }; - - interface NodeApplicationManager; - - interface NodeManager { - /* - * @todo 06-02-01 mentions a 4th argument:in long updateInterval - */ - void joinDomain (in Domain ciao_domain, - in TargetManager manager, - in Logger log); - - void leaveDomain (); - - /* - * @todo According to 06-02-01 there should also be a ResourceCommitmentManager - * as second argument - */ - NodeApplicationManager preparePlan (in DeploymentPlan plan) - raises (StartError, PlanError); - - /* - * @todo According to 06-02-01 InvalidReference shouldn't be here - */ - void destroyManager (in NodeApplicationManager appManager) - raises (StopError, InvalidReference); - - /// CIAO specific extension - /// Destroy the NAM and all the associated NAs with this child_plan - /// We can guarantee that the input DeploymentPlan is valid, since it - /// is fetched from the cached DeploymentPlan of DAM, which has been - /// validated before. - void destroyPlan (in DeploymentPlan plan) - raises (StopError); - - /// CIAO specific extension - /// Get all the shared components installed in this node - ComponentPlans get_shared_components (); - - /* - * @todo According to 06-02-01 missing is: - * Resources getDynamicResources (); - */ - }; -}; - -#endif /* NODEMANAGER_IDL */ diff --git a/CIAO/ciao/Object_Set_T.cpp b/CIAO/ciao/Object_Set_T.cpp deleted file mode 100644 index 5a70d6e0922..00000000000 --- a/CIAO/ciao/Object_Set_T.cpp +++ /dev/null @@ -1,133 +0,0 @@ -// $Id$ - -#ifndef CIAO_OBJECT_SET_T_C -#define CIAO_OBJECT_SET_T_C - -#include "Object_Set_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "Object_Set_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(ciao, Object_Set_T, "$Id$") - -template <class T, class T_var> -CIAO::Object_Set<T, T_var>::Object_Set (CORBA::ULong init_capacity, - CORBA::ULong step) - : capacity_ (init_capacity), - size_ (0), - step_ (step) -{ - this->buffer_ = new T_var [this->capacity_]; -} - -template <class T, class T_var> -CIAO::Object_Set<T, T_var>::~Object_Set () -{ - delete[] this->buffer_; -} - -template <class T, class T_var> void -CIAO::Object_Set<T, T_var>::release () -{ - CORBA::ULong i = 0; - - for (; i < this->size_; ++i) - { - this->buffer_[i] = T::_nil (); - } -} - -template <class T, class T_var> CORBA::Long -CIAO::Object_Set<T, T_var>::add (T *objref) -{ - if (this->size_ == this->capacity_) - this->grow (); - - this->buffer_[this->size_] = T::_duplicate (objref); - return this->size_++; -} - -template<class T, class T_var> CORBA::Long -CIAO::Object_Set<T, T_var>::remove (T *objref) -{ - if (CORBA::is_nil (objref)) - return -1; - - CORBA::ULong i = 0; - - for (; i < this->size_; ++i) - if (objref->_is_equivalent (this->buffer_[i].in ())) // _is_equivalent could be unreliable? - { - --this->size_; - if (i != this->size_) - this->buffer_[i] = this->buffer_[this->size_]; - - this->buffer_[this->size_] = T::_nil (); - return 0; - } - return -1; // not found. -} - -template<class T, class T_var> CORBA::Long -CIAO::Object_Set<T, T_var>::remove_all (void) -{ - for (CORBA::ULong i = 0; i < this->size_; ++i) - this->buffer_[i] = T::_nil (); - - this->size_ = 0; - return 0; -} - -template <class T, class T_var> void -CIAO::Object_Set<T, T_var>::grow (void) -{ - this->capacity_ += this->step_; - - T_var *newbuf = new T_var [this->capacity_]; - - CORBA::ULong i = 0; - for (; i < this->size_; ++i) - newbuf[i] = this->buffer_[i]; // this will hijack the object ownership - - delete[] this->buffer_; - - this->buffer_ = newbuf; -} - -template <class T, class T_var> CORBA::ULong -CIAO::Object_Set<T, T_var>::copy (CORBA::ULong len, - T **buf) -{ - if (buf == 0) - return 0; - - if (len > this->size_) - len = this->size_; - - CORBA::ULong i = 0; - for (; i < len; ++i) - buf[i] = T::_duplicate (this->buffer_[i].in ()); - - return len; -} - -template <class T, class T_var> int -CIAO::Object_Set<T, T_var>::object_in_set (T *objref) -{ - if (CORBA::is_nil (objref)) // Don't count nil objref - return 0; - - CORBA::ULong i = 0; - - for (; i < this->size_; ++i) - if (objref->_is_equivalent (this->buffer_[i].in ())) // _is_equivalent could be unreliable? - return -1; - - return 0; -} -#endif /* CIAO_OBJECT_SET_T_C */ diff --git a/CIAO/ciao/Object_Set_T.h b/CIAO/ciao/Object_Set_T.h deleted file mode 100644 index b11632a5e1b..00000000000 --- a/CIAO/ciao/Object_Set_T.h +++ /dev/null @@ -1,130 +0,0 @@ -// $Id$ - -/** - * @file Object_Set_T.h - * - * Helper template classes for maintaining and managing object - * reference sets. - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - */ - -#ifndef CIAO_OBJECT_SET_T_H -#define CIAO_OBJECT_SET_T_H -#include /**/ "ace/pre.h" - -#include "tao/ORB_Constants.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - /** - * @class Object_Set - * - * @brief A helper template class for maintaining and managing a set - * of object reference. - * - * This class provides a naive implementation of an object reference - * set. It is naive because it simply keeps object references in an - * objref_var array without checking for duplication. More - * importantly, it takes O(n) to to look for an object reference and - * return it. What we really need is a thread-safe hash_set<> like - * class here. Since this is mostly used only during setup/assemble - * time for a CIAO application, i.e., not on critical path, this - * class serves as a place holder for later, more efficient - * implementation. - */ - template <class T, class T_var> - class Object_Set - { - public: - /** - * Default contructor that also allows initializing the initial - * capacity of the set and the increment step. - */ - Object_Set (CORBA::ULong init_capacity = 10, - CORBA::ULong step = 10); - - /// Default destructor. - ~Object_Set (void); - - /// Adding a new object reference to the set. Return -1 if error - /// occurred. - CORBA::Long add (T *objref); - - /// Removing an object from the set. Return -1 if error occurred. - CORBA::Long remove (T *objref); - - /// Removing all objects from the set. Return -1 if error occurred. - CORBA::Long remove_all (void); - - /// Access the underlying T_var array directly. This is added to - /// get around a bug in TAO's sequence of object C++ mapping. - T_var &at (CORBA::ULong index); - - /** - * Get a copy of the object reference set into the incoming array - * @c buffer with capacity of @c size. @c buffer is usually - * allocated using a sequence's @c allocbuf method. Notice that - * caller is responsible to release the object references in - * buffer. - * - * @retval actual number of objrefs copied into @c buffer. - */ - CORBA::ULong copy (CORBA::ULong size, - T **buffer); - - /** - * Check if an object is in the set. Return 0 if false. - */ - int object_in_set (T *objref); - - /// Query the current size the set contains. - CORBA::ULong size (void) const; - - /// Query the current capacity the set. - CORBA::ULong capacity (void) const; - - /** - * Release all object references. - */ - void release (void); - - protected: - /// Grow the internal array holding the object references. - void grow (void); - - /// Pointer to the dynamically allocated buffer that holds the - /// object references. - T_var *buffer_; - - /// Maximun capacity of this->buffer_; - CORBA::ULong capacity_; - - /// Current size in the set. - CORBA::ULong size_; - - /// How many more slots to add each time we expand the capacity of - /// this set. - CORBA::ULong step_; - }; - -} - -#if defined (__ACE_INLINE__) -#include "Object_Set_T.inl" -#endif /* !defined INLINE */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Object_Set_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Object_Set_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* CIAO_OBJECT_SET_T_H */ diff --git a/CIAO/ciao/Object_Set_T.inl b/CIAO/ciao/Object_Set_T.inl deleted file mode 100644 index cd9b8e1ab45..00000000000 --- a/CIAO/ciao/Object_Set_T.inl +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -template <class T, class T_var> ACE_INLINE CORBA::ULong -CIAO::Object_Set<T, T_var>::size (void) const -{ - return this->size_; -} - -template <class T, class T_var> ACE_INLINE CORBA::ULong -CIAO::Object_Set<T, T_var>::capacity (void) const -{ - return this->capacity_; -} - -template <class T, class T_var> ACE_INLINE T_var & -CIAO::Object_Set<T, T_var>::at (CORBA::ULong index) -{ - return this->buffer_[index]; -} diff --git a/CIAO/ciao/Packaging_Data.idl b/CIAO/ciao/Packaging_Data.idl deleted file mode 100644 index 533116196eb..00000000000 --- a/CIAO/ciao/Packaging_Data.idl +++ /dev/null @@ -1,160 +0,0 @@ -// $Id$ - -#ifndef PACKAGING_DATA_IDL -#define PACKAGING_DATA_IDL - -#include "Deployment_Data.idl" - -module Deployment -{ - struct ComponentPackageImport { - ::CORBA::StringSeq location; - }; - - typedef sequence < ComponentPackageImport > ComponentPackageImports; - - struct SubcomponentPropertyReference { - string propertyName; - unsigned long instanceRef; - }; - - struct SubcomponentPortEndpoint { - string portName; - unsigned long instanceRef; - }; - - typedef sequence < SubcomponentPortEndpoint > SubcomponentPortEndpoints; - - typedef sequence < SubcomponentPropertyReference > SubcomponentPropertyReferences; - - struct AssemblyPropertyMapping { - string name; - string externalName; - SubcomponentPropertyReferences delegatesTo; - }; - - typedef sequence < AssemblyPropertyMapping > AssemblyPropertyMappings; - -#ifndef AVOID_IFR_CRASH - struct NamedImplementationArtifact; - - typedef sequence < NamedImplementationArtifact > NamedImplementationArtifacts; -#endif /* AVOID_IFR_CRASH */ - - struct ImplementationArtifactDescription { - string label; - string UUID; - ::CORBA::StringSeq location; - Properties execParameter; - Requirements deployRequirement; -#ifndef AVOID_IFR_CRASH - NamedImplementationArtifacts dependsOn; -#endif /* AVOID_IFR_CRASH */ - Properties infoProperty; - }; - - struct NamedImplementationArtifact { - string name; - ImplementationArtifactDescription referencedArtifact; - }; - - struct MonolithicImplementationDescription { - Properties nodeExecParameter; - Properties componentExecParameter; -#ifndef AVOID_IFR_CRASH - NamedImplementationArtifacts primaryArtifact; -#endif /* AVOID_IFR_CRASH */ - ImplementationRequirements deployRequirement; - }; - - typedef sequence < MonolithicImplementationDescription > MonolithicImplementationDescriptions; - -#ifndef AVOID_IFR_CRASH - struct PackageConfiguration; - - typedef sequence < PackageConfiguration > PackageConfigurations; - - struct ComponentPackageDescription; - - typedef sequence < ComponentPackageDescription > ComponentPackageDescriptions; -#endif /* AVOID_IFR_CRASH */ - - struct SubcomponentInstantiationDescription { - string name; -#ifndef AVOID_IFR_CRASH - ComponentPackageDescriptions basePackage; - PackageConfigurations specializedConfig; -#endif /* AVOID_IFR_CRASH */ - Requirements selectRequirement; - Properties configProperty; - ComponentPackageReferences referencedPackage; - ComponentPackageImports importedPackage; - }; - - typedef sequence < SubcomponentInstantiationDescription > SubcomponentInstantiationDescriptions; - - struct AssemblyConnectionDescription { - string name; - Requirements deployRequirement; - ComponentExternalPortEndpoints externalEndpoint; - SubcomponentPortEndpoints internalEndpoint; - ExternalReferenceEndpoints externalReference; - }; - - typedef sequence < AssemblyConnectionDescription > AssemblyConnectionDescriptions; - - struct ComponentAssemblyDescription { - SubcomponentInstantiationDescriptions instance; - AssemblyConnectionDescriptions connection; - AssemblyPropertyMappings externalProperty; - }; - - typedef sequence < ComponentAssemblyDescription > ComponentAssemblyDescriptions; - - struct ComponentImplementationDescription { - string label; - string UUID; - ComponentInterfaceDescription implements; - ComponentAssemblyDescriptions assemblyImpl; - MonolithicImplementationDescriptions monolithicImpl; - Properties configProperty; - Capabilities capability; - ImplementationDependencies dependsOn; - Properties infoProperty; - }; - - - struct PackagedComponentImplementation { - string name; - ComponentImplementationDescription referencedImplementation; - }; - - - typedef sequence < PackagedComponentImplementation > PackagedComponentImplementations; - - struct ComponentPackageDescription { - string label; - string UUID; - ComponentInterfaceDescription realizes; - Properties configProperty; - PackagedComponentImplementations implementation; - Properties infoProperty; - }; - - - struct PackageConfiguration { - string label; - string UUID; -#ifndef AVOID_IFR_CRASH - PackageConfigurations specializedConfig; - ComponentPackageDescriptions basePackage; -#endif /* AVOID_IFR_CRASH */ - ComponentPackageReferences reference; - Requirements selectRequirement; - Properties configProperty; - }; - - -}; - -#endif /* PACKAGING_DATA_IDL */ diff --git a/CIAO/ciao/Port_Activator.cpp b/CIAO/ciao/Port_Activator.cpp deleted file mode 100644 index e428102a355..00000000000 --- a/CIAO/ciao/Port_Activator.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "Port_Activator.h" - -ACE_RCSID (ciao, - Servant_Activator, - "$Id$") - -namespace CIAO -{ - Port_Activator::Port_Activator (const char *oid, - const char *name, - Type t) - : oid_ (oid) - , name_ (name) - , t_ (t) - { - } - - Port_Activator::~Port_Activator (void) - { - } - - const char* - Port_Activator::name (void) const - { - // @@ TODO, need to be inlined. - return this->oid_.in (); - } - - void - Port_Activator::set_name (const char* name) - { - this->oid_ = name; - } -} diff --git a/CIAO/ciao/Port_Activator.h b/CIAO/ciao/Port_Activator.h deleted file mode 100644 index 5ab3adb2604..00000000000 --- a/CIAO/ciao/Port_Activator.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file Port_Activator.h - * - * $Id$ - * - * @authors Bala Natarajan <bala@dre.vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_PORT_ACTIVATOR_H -#define CIAO_PORT_ACTIVATOR_H -#include /**/ "ace/pre.h" - -#include "ace/config-lite.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/CIAO_Server_Export.h" - -#include "tao/PortableServer/PortableServer.h" - -namespace CIAO -{ - /** - * @class Port_Activator - * - * @brief Base class for port activations - * - * This is a ABC for the Port_Activator_T <> template class where - * the bulk of the work is done. This class is simply a place holder - * so that we could use the pointer to this class to achieve - * polymorphism for facet and consumer servant activations. - * - */ - class CIAO_SERVER_Export Port_Activator - { - public: - enum Type - { - Facet, - Sink - }; - - Port_Activator (const char *oid, - const char *name, - Type t); - - virtual ~Port_Activator (void); - - /// Return the name of port that this activator encapulates. - const char* name (void) const; - - /// Set the name - void set_name (const char* name); - - /// Activate the servant reponsible for this port. - /** - * There are intentionally no throw specifications. It is the - * caller's responsibility to handle CORBA and C++ - * specifications. - */ - virtual PortableServer::Servant activate ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) = 0; - - virtual void deactivate ( - const PortableServer::Servant servant - ACE_ENV_ARG_DECL) = 0; - - protected: - /// The object ID that is used to activate the servant within the - /// POA. - CORBA::String_var oid_; - - /// Name of the port - CORBA::String_var name_; - - /// What type of port is it, a consumer or facet. - Type t_; - }; -} - - - -#include /**/ "ace/post.h" -#endif /*CIAO_PORT_ACTIVATOR_H*/ diff --git a/CIAO/ciao/Port_Activator_T.cpp b/CIAO/ciao/Port_Activator_T.cpp deleted file mode 100644 index 6881ffc73e5..00000000000 --- a/CIAO/ciao/Port_Activator_T.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// $Id$ - -#ifndef CIAO_PORT_ACTIVATOR_T_CPP -#define CIAO_PORT_ACTIVATOR_T_CPP - -#include "Port_Activator_T.h" -#include "tao/CORBA_String.h" - -#include "ace/OS_NS_string.h" - - -namespace CIAO -{ - template <typename SERV, - typename EXEC, - typename CONTEXT, - typename COMP_SERV> - Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::Port_Activator_T ( - const char *oid, - const char *name, - Port_Activator::Type t, - EXEC *e, - CONTEXT *c, - COMP_SERV *cc) - : Port_Activator (oid, name, t) - , executor_ (e) - , context_ (c) - , comp_serv_ (cc) - { - } - - template <typename SERV, - typename EXEC, - typename CONTEXT, - typename COMP_SERV> - void - Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::deactivate ( - const PortableServer::Servant servant - ACE_ENV_ARG_DECL) - { - SERVANT *s = dynamic_cast<SERVANT *> (servant); - s->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - - template <typename SERV, - typename EXEC, - typename CONTEXT, - typename COMP_SERV> - PortableServer::Servant - Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::activate ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - { - CORBA::String_var str = - PortableServer::ObjectId_to_string (oid); - - // An additional check, may not be necessary. Being on the safe - // side. - if (ACE_OS::strcmp (this->oid_.in (), - str.in ()) == 0) - { - if (this->executor_ == 0 && - this->t_ == Port_Activator::Facet) - { - CORBA::Object_var tmp = - this->comp_serv_->get_facet_executor (this->name_.in ()); - - this->executor_ = EXEC::_narrow (tmp.in ()); - } - - SERVANT *s = 0; - - ACE_NEW_THROW_EX (s, - SERVANT (this->executor_, - this->context_), - CORBA::NO_MEMORY ()); - return s; - } - - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); - } -} - -#endif /*SERVANT_ACTIVATOR_T_CPP*/ diff --git a/CIAO/ciao/Port_Activator_T.h b/CIAO/ciao/Port_Activator_T.h deleted file mode 100644 index 8afa788b655..00000000000 --- a/CIAO/ciao/Port_Activator_T.h +++ /dev/null @@ -1,84 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Port_Activator_T.h - * - * $Id$ - * - * @authors Bala Natarajan <bala@dre.vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_PORT_ACTIVATOR_T_H -#define CIAO_PORT_ACTIVATOR_T_H -#include /**/ "ace/pre.h" - -#include "ciao/Port_Activator.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - -namespace CIAO -{ - /** - * @class Port_Activator_T - * - * @brief Concrete class that implements the strategy for creating - * the right type of servant for the ports in question. - * - * This class is parametrized by the servant type for the port, the - * executor type for the port, the context for the component and the - * component servant which instantiated this class within the - * container. - */ - template <typename SERV, - typename EXEC, - typename CONTEXT, - typename COMP_SERV> - class Port_Activator_T : public virtual Port_Activator - { - public: - typedef SERV SERVANT; - - Port_Activator_T (const char *oid, - const char *name, - Port_Activator::Type t, - EXEC *e, - CONTEXT *c, - COMP_SERV *cs); - - /// Template method from the base class, please see the base class - /// documentation for details. - PortableServer::Servant activate ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL); - - void deactivate ( - const PortableServer::Servant servant - ACE_ENV_ARG_DECL); - - private: - /// The executor - EXEC *executor_; - - /// Context classes - CONTEXT *context_; - - /// COmponent servant which created <this> - COMP_SERV *comp_serv_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Port_Activator_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Port_Activator_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /*CIAO_SERVANT_ACTIVATOR_T_H*/ diff --git a/CIAO/ciao/RepositoryManager.idl b/CIAO/ciao/RepositoryManager.idl deleted file mode 100644 index c5645bcab69..00000000000 --- a/CIAO/ciao/RepositoryManager.idl +++ /dev/null @@ -1,40 +0,0 @@ -// $Id$ -#ifndef REPOSITORY_MANAGER_IDL -#define REPOSITORY_MANAGER_IDL - -#include "Packaging_Data.idl" -#include "Deployment.idl" - -module Deployment { - - exception NameExists { - }; - - exception PackageError { - string source; - string reason; - }; - - interface RepositoryManager { - void installPackage (in string installationName, - in string location, - in boolean replace) - raises (NameExists, PackageError); - void createPackage (in string installationName, - in PackageConfiguration package, - in string baseLocation, - in boolean replace) - raises (NameExists, PackageError); - PackageConfiguration findPackageByName (in string name) - raises (NoSuchName); - PackageConfiguration findPackageByUUID (in string UUID) - raises (NoSuchName); - ::CORBA::StringSeq findNamesByType (in string type); - ::CORBA::StringSeq getAllNames (); - ::CORBA::StringSeq getAllTypes (); - void deletePackage (in string installationName) - raises (NoSuchName); - }; -}; - -#endif /* REPOSITOR_MANAGER_IDL */ diff --git a/CIAO/ciao/Servant_Activator.cpp b/CIAO/ciao/Servant_Activator.cpp deleted file mode 100644 index cf194524ec7..00000000000 --- a/CIAO/ciao/Servant_Activator.cpp +++ /dev/null @@ -1,197 +0,0 @@ -#include "Servant_Activator.h" -#include "CIAO_common.h" -#include "Port_Activator.h" -#include "ace/Log_Msg.h" -#include "ace/OS_NS_string.h" - -ACE_RCSID (ciao, - Servant_Activator, - "$Id$") - -namespace CIAO -{ - Servant_Activator::Servant_Activator (CORBA::ORB_ptr o) - : orb_ (CORBA::ORB::_duplicate (o)) - // @@ TODO, avoid this magic number - , pa_ (64) - , slot_index_ (0) - { - } - - Servant_Activator::~Servant_Activator (void) - { - { - ACE_GUARD (TAO_SYNCH_MUTEX, - guard, - this->mutex_); - - const size_t sz = this->slot_index_; - - for (size_t t = 0; t != sz; ++t) - { - Port_Activator *&tmp = this->pa_[t]; - - delete tmp; - } - } - } - - bool - Servant_Activator::update_port_activator ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CORBA::String_var str = - PortableServer::ObjectId_to_string (oid); - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - guard, - this->mutex_, - 0); - const size_t sz = this->slot_index_; - for (size_t t = 0; t != sz; ++t) - { - Port_Activator *&tmp = this->pa_[t]; - if (ACE_OS::strcmp (tmp->name (), str.in ()) == 0) - { - tmp->set_name ("dummy"); - //delete tmp; - //--this->slot_index_; - } - } - } - return true; - } - - PortableServer::Servant - Servant_Activator::incarnate (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - PortableServer::ForwardRequest)) - { - CORBA::String_var str = - PortableServer::ObjectId_to_string (oid); - - if (CIAO::debug_level () > 9) - ACE_DEBUG ((LM_DEBUG, - "CIAO (%P|%t) - Servant_Activator::incarnate, " - "activating port name [%s] \n", - str.in ())); - - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - guard, - this->mutex_, - 0); - - const size_t sz = this->slot_index_; - - Port_Activator *tmp = 0; - - for (size_t t = 0; t != sz; ++t) - { - if (this->pa_.get (tmp, t) == -1) - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); - - if (tmp == 0) - { - if (CIAO::debug_level () > 9) - ACE_ERROR ((LM_ERROR, - "CIAO (%P|%t) - Servant_Activator::incarnate ()," - " value from the array is null \n")); - continue; - } - if (ACE_OS::strcmp (tmp->name (), - str.in ()) == 0) - { - // We should try avoiding making outbound calls with the - // lock held. Oh well, let us get some sense of sanity in - // CIAO to do think about these. - if (CIAO::debug_level () > 5) - ACE_DEBUG ((LM_DEBUG, "Activating Port %s\n", - str.in ())); - - return this->pa_[t]->activate (oid - ACE_ENV_ARG_PARAMETER); - } - } - } - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (), - 0); - } - - void - Servant_Activator::etherealize (const PortableServer::ObjectId &oid, - PortableServer::POA_ptr , - PortableServer::Servant servant, - CORBA::Boolean , - CORBA::Boolean - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CORBA::String_var str = - PortableServer::ObjectId_to_string (oid); - - const size_t sz = this->slot_index_; - - Port_Activator *tmp = 0; - - for (size_t t = 0; t != sz; ++t) - { - if (this->pa_.get (tmp, t) == -1) - { - ACE_DEBUG ((LM_DEBUG, "Could not get Port Activator\n")); - continue; - } - - if (tmp == 0) - { - ACE_DEBUG ((LM_DEBUG, "Port Activator is NULL\n")); - continue; - } - if (ACE_OS::strcmp (tmp->name (), - str.in ()) == 0) - { - ACE_DEBUG ((LM_DEBUG, "Deactivating Port %s\n", - str.in ())); - this->pa_[t]->deactivate (servant - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - } - } - - bool - Servant_Activator::register_port_activator (Port_Activator *pa) - { - ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, - guard, - this->mutex_, - false); - - // @@ TODO, need to implement a better algorithm here. - // - if (this->slot_index_ >= this->pa_.size ()) - this->pa_.size ((this->slot_index_ + 1)); - - if (this->pa_.set (pa, this->slot_index_) == 0) - { - ++this->slot_index_; - - if (CIAO::debug_level () > 9) - ACE_DEBUG ((LM_DEBUG, - "CIAO (%P|%t) - Servant_Activator::register_port_activator" - " with port name [%s]," - " the slot_index_ is [%d] \n", - pa->name (), - this->slot_index_)); - - return true; - } - - return false; - } -} diff --git a/CIAO/ciao/Servant_Activator.h b/CIAO/ciao/Servant_Activator.h deleted file mode 100644 index 551388de004..00000000000 --- a/CIAO/ciao/Servant_Activator.h +++ /dev/null @@ -1,112 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Servant_Activator.h - * - * $Id$ - * - * @authors Balachandran Natarajan <bala@dre.vanderbilt.edu> - */ -//============================================================================= - -#ifndef CIAO_SERVANT_ACTIVATOR_H -#define CIAO_SERVANT_ACTIVATOR_H -#include /**/ "ace/pre.h" - -#include "ace/Array_Base.h" -#include "ciao/CIAO_Server_Export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/PortableServer/PortableServer.h" -#include "tao/PortableServer/ServantActivatorC.h" -#include "tao/PortableServer/ForwardRequestC.h" -#include "tao/LocalObject.h" - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4250) -#endif /* _MSC_VER */ - -namespace CIAO -{ - class Port_Activator; - - /** - * @class Servant_Activator - * - * @brief Activator that is registered with the POA for facet and - * consumer servants. - * - * This class acts like a factory in some sense. This factory is - * registered with the POA with RETAIN policy. When the factory gets - * a call back as part of the upcall, this factory looks at the - * list of port activators registered, uses the OID to pick the - * right one (yes a linear algorithm is used), calls activate () on - * it which returns the servant for *that* port. - */ - class CIAO_SERVER_Export Servant_Activator - : public virtual PortableServer::ServantActivator - , public virtual TAO_Local_RefCounted_Object - { - public: - Servant_Activator (CORBA::ORB_ptr o); - - virtual ~Servant_Activator (void); - - bool update_port_activator (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// 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)); - - /// Local helper methods - bool register_port_activator (Port_Activator *pa); - - private: - /// Pointer to our ORB - CORBA::ORB_var orb_; - - /// @@ This should be changed at some point of time so that we - /// don't land up with a linear algorithm - typedef ACE_Array_Base<Port_Activator *> Port_Activators; - - /// Array of port activators - Port_Activators pa_; - - /// Running index of the slot that has been just filled in. - size_t slot_index_; - - /// Mutex that synchronizes access to the array. - ACE_SYNCH_MUTEX mutex_; - }; -} - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - -#include /**/ "ace/post.h" -#endif /*CIAO_SERVANT_ACTIVATOR_H*/ diff --git a/CIAO/ciao/Servant_Impl_Base.cpp b/CIAO/ciao/Servant_Impl_Base.cpp deleted file mode 100644 index dc50e0bd0f8..00000000000 --- a/CIAO/ciao/Servant_Impl_Base.cpp +++ /dev/null @@ -1,710 +0,0 @@ -// $Id$ - -#include "Servant_Impl_Base.h" -#include "StandardConfigurator_Impl.h" -#include "Container_Base.h" - -namespace CIAO -{ - Servant_Impl_Base::Servant_Impl_Base (Components::CCMHome_ptr home, - Home_Servant_Impl_Base *home_servant, - Session_Container * c) - : home_ (Components::CCMHome::_duplicate (home)), - home_servant_ (home_servant), - container_ (c) - { - } - - Servant_Impl_Base::~Servant_Impl_Base (void) - { - } - - // Operations for CCMObject interface. - - ::Components::PrimaryKeyBase * - Servant_Impl_Base::get_primary_key ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::NoKeyAvailable)) - { - ACE_THROW_RETURN (::Components::NoKeyAvailable (), 0); - - return 0; - } - - CORBA::IRObject_ptr - 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 ()); - } - - void - Servant_Impl_Base::configuration_complete ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidConfiguration)) - { - // CIAO to-do - } - - void - Servant_Impl_Base::remove ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) - { - ACE_TRY - { - // Removing Facets - Components::FacetDescriptions_var facets = - this->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - const CORBA::ULong facet_len = facets->length (); - CORBA::ULong i = 0; - for (i = 0; i < facet_len; ++i) - { - PortableServer::ObjectId_var facet_id = - this->container_->the_facet_cons_POA ()->reference_to_id - (facets[i]->facet_ref () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CIAO::Servant_Activator *sa = - this->container_->ports_servant_activator (); - - sa->update_port_activator (facet_id.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->container_->the_facet_cons_POA ()->deactivate_object - (facet_id ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - // Removed Facets - - // Removing Consumers - Components::ConsumerDescriptions_var consumers = - this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - const CORBA::ULong consumer_len = consumers->length (); - CORBA::ULong j = 0; - for (j = 0; j < consumer_len; ++j) - { - PortableServer::ObjectId_var cons_id = - this->container_->the_facet_cons_POA ()->reference_to_id - (consumers[j]->consumer () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CIAO::Servant_Activator *sa = - this->container_->ports_servant_activator (); - sa->update_port_activator (cons_id.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->container_->the_facet_cons_POA ()->deactivate_object - (cons_id ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - - Components::SessionComponent_var temp = this->get_executor (); - temp->ccm_remove (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var objref = - this->container_->get_objref (this); - - Components::CCMObject_var ccmobjref = - Components::CCMObject::_narrow (objref.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::ObjectId_var oid; - - this->container_->uninstall_component (ccmobjref.in (), - oid.out () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - this->home_servant_->update_component_map (oid); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Port not active\n"); - } - ACE_ENDTRY; - } - - ::Components::ConnectionDescriptions * - Servant_Impl_Base::get_connections ( - const char * /* name */ - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); - } - - ::Components::ComponentPortDescription * - Servant_Impl_Base::get_all_ports ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - OBV_Components::ComponentPortDescription *cps = 0; - ACE_NEW_RETURN (cps, - OBV_Components::ComponentPortDescription, - 0); - ::Components::ComponentPortDescription_var retv = cps; - - ::Components::FacetDescriptions_var facets_desc = - this->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::ReceptacleDescriptions_var receptacle_desc = - this->get_all_receptacles (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::ConsumerDescriptions_var consumer_desc = - this->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::EmitterDescriptions_var emitter_desc = - this->get_all_emitters (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::Components::PublisherDescriptions_var publisher_desc = - this->get_all_publishers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - retv->facets (facets_desc.in ()); - retv->receptacles (receptacle_desc.in ()); - retv->consumers (consumer_desc.in ()); - retv->emitters (emitter_desc.in ()); - retv->publishers (publisher_desc.in ()); - - return retv._retn (); - } - - CORBA::Object_ptr - Servant_Impl_Base::provide_facet ( - const char *name - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - if (0 == name) - { - ACE_THROW_RETURN (Components::InvalidName (), - CORBA::Object::_nil ()); - } - - CORBA::Object_ptr retval = this->lookup_facet (name); - - if (CORBA::is_nil (retval)) - { - ACE_THROW_RETURN (Components::InvalidName (), - CORBA::Object::_nil ()); - } - - return retval; - } - - Components::FacetDescriptions * - Servant_Impl_Base::get_named_facets ( - const ::Components::NameList & names - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - Components::FacetDescriptions *retval = 0; - ACE_NEW_RETURN (retval, - ::Components::FacetDescriptions, - 0); - Components::FacetDescriptions_var safe_retval = retval; - CORBA::ULong len = names.length (); - safe_retval->length (len); - ::Components::FacetDescription *tmp = 0; - - for (CORBA::ULong i = 0; i < len; ++i) - { - tmp = this->lookup_facet_description (names[i]); - - if (0 == tmp) - { - ACE_THROW_RETURN (Components::InvalidName (), - 0); - } - - safe_retval[i] = tmp; - } - - return safe_retval._retn (); - } - - ::Components::FacetDescriptions * - Servant_Impl_Base::get_all_facets ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::FacetDescriptions *tmp = 0; - ACE_NEW_RETURN (tmp, - ::Components::FacetDescriptions, - 0); - - ::Components::FacetDescriptions_var retval = tmp; - - retval->length (this->facet_table_.size ()); - CORBA::ULong i = 0; - - for (FacetTable::const_iterator iter = this->facet_table_.begin (); - iter != this->facet_table_.end (); - ++iter, ++i) - { - FacetTable::const_reference entry = *iter; - retval[i] = entry.second; - } - - return retval._retn (); - } - - - ::Components::ConsumerDescriptions * - Servant_Impl_Base::get_all_consumers ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::ConsumerDescriptions *tmp = 0; - ACE_NEW_THROW_EX (tmp, - ::Components::ConsumerDescriptions ( - this->consumer_table_.size ()), - CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (0); - - ::Components::ConsumerDescriptions_var retval = tmp; - - retval->length (this->consumer_table_.size ()); - CORBA::ULong i = 0; - - for (ConsumerTable::const_iterator iter = this->consumer_table_.begin (); - iter != this->consumer_table_.end (); - ++iter, ++i) - { - // ACE_DEBUG ((LM_DEBUG, "EXECUTING \n")); - ConsumerTable::const_reference entry = *iter; - retval[i] = entry.second; - } - - return retval._retn (); - } - - - ::Components::EventConsumerBase_ptr - Servant_Impl_Base::get_consumer ( - const char *sink_name - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - if (0 == sink_name) - { - ACE_THROW_RETURN (Components::InvalidName (), - Components::EventConsumerBase::_nil ()); - } - - Components::EventConsumerBase_ptr retval = - this->lookup_consumer (sink_name); - - if (CORBA::is_nil (retval)) - { - ACE_THROW_RETURN (Components::InvalidName (), - Components::EventConsumerBase::_nil ()); - } - - return retval; - } - - ::Components::ConsumerDescriptions * - Servant_Impl_Base::get_named_consumers ( - const ::Components::NameList & names - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - Components::ConsumerDescriptions *retval = 0; - ACE_NEW_RETURN (retval, - ::Components::ConsumerDescriptions, - 0); - Components::ConsumerDescriptions_var safe_retval = retval; - CORBA::ULong len = names.length (); - safe_retval->length (len); - ::Components::ConsumerDescription *tmp = 0; - - for (CORBA::ULong i = 0; i < len; ++i) - { - tmp = this->lookup_consumer_description (names[i]); - - if (0 == tmp) - { - ACE_THROW_RETURN (Components::InvalidName (), - 0); - } - - safe_retval[i] = tmp; - } - - return safe_retval._retn (); - } - - ::Components::EmitterDescriptions * - Servant_Impl_Base::get_named_emitters ( - const ::Components::NameList & /* names */ - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0); - } - - ::Components::ReceptacleDescriptions * - - Servant_Impl_Base::get_all_receptacles ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_DEBUG ((LM_DEBUG, "In Servant_Impl_Base::get_all_receptacles\n")); - - ::Components::ReceptacleDescriptions *tmp = 0; - ACE_NEW_RETURN (tmp, - ::Components::ReceptacleDescriptions, - 0); - - ::Components::ReceptacleDescriptions_var retval = tmp; - - retval->length (this->receptacle_table_.current_size ()); - CORBA::ULong i = 0; - - ACE_DEBUG ((LM_DEBUG, "Building sequence of length %d\n", retval->length())); - - for (ReceptacleTable::iterator iter = this->receptacle_table_.begin (); - iter != this->receptacle_table_.end (); - ++iter, ++i) - { - ACE_DEBUG ((LM_DEBUG, "Starting loop iteration...\n", retval->length())); - - ReceptacleTable::ENTRY & entry = *iter; - retval[i] = entry.int_id_; - } - - ACE_DEBUG ((LM_DEBUG, "Escaped loop.\n")); - return retval._retn (); - } - - ::Components::ReceptacleDescriptions * - Servant_Impl_Base::get_named_receptacles ( - const ::Components::NameList & /* names */ - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0); - } - - ::Components::PublisherDescriptions * - Servant_Impl_Base::get_named_publishers ( - const ::Components::NameList & /* names */ - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)) - { - ACE_THROW_RETURN (::CORBA::NO_IMPLEMENT (), 0); - } - - /// Protected operations. - - void - Servant_Impl_Base::add_facet (const char *port_name, - ::CORBA::Object_ptr port_ref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( ::CORBA::SystemException)) - { - if (0 == port_name || ::CORBA::is_nil (port_ref)) - { - ACE_THROW ( ::CORBA::BAD_PARAM ()); - return; - } - - ::Components::FacetDescription *fd = 0; - ACE_NEW (fd, - ::OBV_Components::FacetDescription); - ::Components::FacetDescription_var safe = fd; - - fd->name (port_name); - fd->type_id (port_ref->_interface_repository_id ()); - fd->facet_ref (port_ref); - - FacetTable::value_type entry; - entry.first = port_name; - entry.second = safe._retn (); - - ACE_WRITE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_); - - (void) this->facet_table_.insert (entry); - } - - CORBA::Object_ptr - Servant_Impl_Base::lookup_facet (const char *port_name) - { - if (0 == port_name) - { - return CORBA::Object::_nil (); - } - - ACE_READ_GUARD_RETURN (TAO_SYNCH_MUTEX, - mon, - this->lock_, - CORBA::Object::_nil ()); - - FacetTable::const_iterator iter = - this->facet_table_.find (port_name); - - if (iter == this->facet_table_.end ()) - { - return CORBA::Object::_nil (); - } - - return CORBA::Object::_duplicate (iter->second->facet_ref ()); - } - - ::Components::FacetDescription * - Servant_Impl_Base::lookup_facet_description (const char *port_name) - { - if (0 == port_name) - { - /// Calling function will throw InvalidName after getting this. - return 0; - } - - ::Components::FacetDescription_var fd; - FacetTable::const_iterator iter; - - { - ACE_READ_GUARD_RETURN (TAO_SYNCH_MUTEX, - mon, - this->lock_, - 0); - - iter = this->facet_table_.find (port_name); - - if (iter != this->facet_table_.end ()) - { - fd = iter->second; - } - } - - return fd._retn (); - } - - void - Servant_Impl_Base::add_receptacle (const char *receptacle_name, - CORBA::Object_ptr recept_ref, - ::Components::Cookie * cookie) - { - ACE_DEBUG ((LM_DEBUG, "In Servant_Impl_Base::add_receptacle (%s)\n", receptacle_name)); - - ::Components::ReceptacleDescription_var safe; - ::Components::ReceptacleDescription *rd = 0; - - if (this->receptacle_table_.find (receptacle_name, - safe) == -1) - { - ACE_DEBUG ((LM_DEBUG, "Found no receptacle named (%s)\n", receptacle_name)); - - ACE_NEW (rd, - OBV_Components::ReceptacleDescription); - safe = rd; - - rd->name (receptacle_name); - rd->type_id (recept_ref->_interface_repository_id ()); - // The receptacle is a multiplex receptacle if and only if a - // cookie was given. - rd->is_multiple (cookie != 0); - - ::Components::ConnectionDescription *cd = 0; - ACE_NEW (cd, - OBV_Components::ConnectionDescription); - ::Components::ConnectionDescription_var cd_safe = cd; - - cd->ck (cookie); - cd->objref (recept_ref); - - ::Components::ConnectionDescriptions cds (1); - - cds.length (1); - cds[0] = cd_safe; - rd->connections (cds); - } - else - { - ACE_DEBUG ((LM_DEBUG, "Found a receptacle named (%s)\n", receptacle_name)); - rd = safe.inout (); - - ::Components::ConnectionDescription *cd = 0; - ACE_NEW (cd, - OBV_Components::ConnectionDescription); - ::Components::ConnectionDescription_var cd_safe = cd; - - cd->ck (cookie); - cd->objref (recept_ref); - - ::Components::ConnectionDescriptions & cds = rd->connections (); - CORBA::ULong old_length = cds.length (); - ACE_DEBUG ((LM_DEBUG, "Old length was %d\n", old_length)); - cds.length (old_length + 1); - ACE_DEBUG ((LM_DEBUG, "New length %d\n", cds.length ())); - cds [old_length] = cd_safe; - ACE_DEBUG ((LM_DEBUG, "Added new connection to receptacle named (%s)\n", receptacle_name)); - } - - if (this->receptacle_table_.bind (receptacle_name, safe) == 0) - { - ACE_DEBUG ((LM_DEBUG, "Successfully added new receptacle named (%s)\n", receptacle_name)); - } - } - - void - Servant_Impl_Base::add_consumer ( - const char *port_name, - ::Components::EventConsumerBase_ptr port_ref - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC (( ::CORBA::SystemException)) - { - if (0 == port_name || ::CORBA::is_nil (port_ref)) - { - ACE_THROW ( ::CORBA::BAD_PARAM ()); - return; - } - - ::Components::ConsumerDescription *cd = 0; - ACE_NEW (cd, - ::OBV_Components::ConsumerDescription); - ::Components::ConsumerDescription_var safe = cd; - - cd->name (port_name); - cd->type_id (port_ref->_interface_repository_id ()); - cd->consumer (port_ref); - - ConsumerTable::value_type entry; - entry.first = port_name; - entry.second = safe._retn (); - - ACE_WRITE_GUARD (TAO_SYNCH_MUTEX, mon, this->lock_); - - (void) this->consumer_table_.insert (entry); - } - - ::Components::EventConsumerBase_ptr - Servant_Impl_Base::lookup_consumer (const char *port_name) - { - if (0 == port_name) - { - return ::Components::EventConsumerBase::_nil (); - } - - ACE_READ_GUARD_RETURN (TAO_SYNCH_MUTEX, - mon, - this->lock_, - ::Components::EventConsumerBase::_nil ()); - - ConsumerTable::const_iterator iter = - this->consumer_table_.find (port_name); - - if (iter == this->consumer_table_.end ()) - { - return ::Components::EventConsumerBase::_nil (); - } - - return - ::Components::EventConsumerBase::_duplicate ( - iter->second->consumer () - ); - } - - ::Components::ConsumerDescription * - Servant_Impl_Base::lookup_consumer_description ( - const char *port_name - ) - { - if (0 == port_name) - { - /// Calling function will throw InvalidName after getting this. - return 0; - } - - ::Components::ConsumerDescription_var cd; - ConsumerTable::const_iterator iter; - - { - ACE_READ_GUARD_RETURN (TAO_SYNCH_MUTEX, - mon, - this->lock_, - 0); - - iter = this->consumer_table_.find (port_name); - - if (iter != this->consumer_table_.end ()) - { - cd = iter->second; - } - } - - return cd._retn (); - } - - ::Components::StandardConfigurator_ptr - Servant_Impl_Base::get_standard_configurator (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - // Create the configurator servant. - StandardConfigurator_Impl *config_impl = 0; - - ACE_NEW_THROW_EX (config_impl, - StandardConfigurator_Impl (this), - CORBA::NO_MEMORY ()); - - - Components::StandardConfigurator_var configurator = - config_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (Components::StandardConfigurator::_nil ()); - - return configurator._retn (); - } - - PortableServer::POA_ptr - Servant_Impl_Base::_default_POA ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - { - return - PortableServer::POA::_duplicate (container_->the_POA ()); - } -} - diff --git a/CIAO/ciao/Servant_Impl_Base.h b/CIAO/ciao/Servant_Impl_Base.h deleted file mode 100644 index 38d855aa5ab..00000000000 --- a/CIAO/ciao/Servant_Impl_Base.h +++ /dev/null @@ -1,278 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Servant_Impl_Base.h - * - * $Id$ - * - * This file contains the non-template declaration of a base class for - * the template mixin for the generated servant class. - * - * @author Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_SERVANT_IMPL_BASE_H -#define CIAO_SERVANT_IMPL_BASE_H - -#include /**/ "ace/pre.h" -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Array_Map.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Active_Map_Manager_T.h" -#include "ace/Thread_Mutex.h" - -#include "CCM_EventC.h" -#include "CIAO_Server_Export.h" -#include "CCM_ContainerC.h" -#include "CCM_ObjectS.h" -#include "CCM_StandardConfiguratorC.h" -#include "Home_Servant_Impl_Base.h" -#include "Servant_Activator.h" - -namespace CIAO -{ - class Session_Container; - - /** - * @class Servant_Impl_Base - * - * @brief Non-template base class for Servant_Impl. - * - * Holds the non-template parts of its child class - * Servant_Impl. - */ - class CIAO_SERVER_Export Servant_Impl_Base - : public virtual POA_Components::CCMObject - { - public: - Servant_Impl_Base (Components::CCMHome_ptr home, - Home_Servant_Impl_Base *home_servant, - Session_Container * c); - - virtual ~Servant_Impl_Base (void); - - /// Operations for CCMObject interface. - - virtual ::Components::PrimaryKeyBase * - get_primary_key (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::NoKeyAvailable)); - - virtual CORBA::IRObject_ptr - get_component_def (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual Components::SessionComponent_ptr - get_executor (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)) = 0; - - virtual void - configuration_complete (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidConfiguration)); - - virtual void - remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)); - - virtual ::Components::ConnectionDescriptions * - get_connections (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::ComponentPortDescription * - get_all_ports (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr - provide_facet (const char *name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::FacetDescriptions * - get_named_facets (const ::Components::NameList & names - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::FacetDescriptions * - get_all_facets (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - - virtual ::Components::ConsumerDescriptions * - get_all_consumers (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - - virtual ::Components::EventConsumerBase_ptr - get_consumer (const char *sink_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::ConsumerDescriptions * - get_named_consumers (const ::Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::EmitterDescriptions * - get_named_emitters (const ::Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::ReceptacleDescriptions * - get_named_receptacles (const ::Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - virtual ::Components::ReceptacleDescriptions * - get_all_receptacles (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::PublisherDescriptions * - get_named_publishers (const ::Components::NameList & names - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::InvalidName)); - - /// Operation to set attributes on the component. - virtual void set_attributes (const Components::ConfigValues &descr - ACE_ENV_ARG_DECL) = 0; - - // Creates and returns the StandardConfigurator for the component. - virtual ::Components::StandardConfigurator_ptr - get_standard_configurator (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// Override that returns the (passed-in) default POA of our member - /// component's container, to ensure that we get registered - /// to that POA when _this() is called. - virtual PortableServer::POA_ptr _default_POA ( - ACE_ENV_SINGLE_ARG_DECL - ); - - protected: - void add_facet (const char *port_name, - ::CORBA::Object_ptr port_ref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( ::CORBA::SystemException)); - - CORBA::Object_ptr lookup_facet (const char *port_name); - - ::Components::FacetDescription *lookup_facet_description ( - const char *port_name - ); - - void add_receptacle (const char *receptacle_name, - CORBA::Object_ptr recept_ref, - ::Components::Cookie * cookie); - - void add_consumer (const char *port_name, - ::Components::EventConsumerBase_ptr port_ref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( ::CORBA::SystemException)); - - ::Components::EventConsumerBase_ptr lookup_consumer ( - const char *port_name - ); - - ::Components::ConsumerDescription *lookup_consumer_description ( - const char *port_name - ); - - /// Called from generated servant class to help with - /// get_all_*() methods. - - template<typename T_var> - static void describe_simplex_receptacle ( - const char *port_name, - const char *port_type_repo_id, - T_var &connection, - ::Components::ReceptacleDescriptions_var &descriptions, - CORBA::ULong slot - ); - - template<typename T_var> - static void describe_multiplex_receptacle ( - const char *port_name, - const char *port_type_repo_id, - ACE_Active_Map_Manager<T_var> &objrefs, - ::Components::ReceptacleDescriptions_var &descriptions, - CORBA::ULong slot - ); - - template<typename T_var> - static void describe_pub_event_source ( - const char *port_name, - const char *port_type_repo_id, - ACE_Active_Map_Manager<T_var> &consumers, - ::Components::PublisherDescriptions_var &descriptions, - CORBA::ULong slot - ); - - template<typename T_var> - static void describe_emit_event_source ( - const char *port_name, - const char *port_type_repo_id, - T_var &consumer_ref, - ::Components::EmitterDescriptions_var &descriptions, - CORBA::ULong slot - ); - - protected: - typedef ACE_Array_Map<ACE_CString, - ::Components::FacetDescription_var> - FacetTable; - - typedef ACE_Array_Map<ACE_CString, - ::Components::ConsumerDescription_var> - ConsumerTable; - - typedef ACE_Hash_Map_Manager_Ex<const char *, - ::Components::ReceptacleDescription_var, - ACE_Hash<const char *>, - ACE_Equal_To<const char *>, - ACE_Null_Mutex> - ReceptacleTable; - - FacetTable facet_table_; - ConsumerTable consumer_table_; - ReceptacleTable receptacle_table_; - Components::CCMHome_var home_; - Home_Servant_Impl_Base *home_servant_; - Session_Container * container_; - private: - /// Not allowed to be used - Servant_Impl_Base (void); - - private: - /// For internal locking of table reads and writes. - TAO_SYNCH_MUTEX lock_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Servant_Impl_Utils_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Servant_Impl_Utils_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_SERVANT_IMPL_T_H */ diff --git a/CIAO/ciao/Servant_Impl_T.cpp b/CIAO/ciao/Servant_Impl_T.cpp deleted file mode 100644 index c1e7a6ce117..00000000000 --- a/CIAO/ciao/Servant_Impl_T.cpp +++ /dev/null @@ -1,300 +0,0 @@ -// $Id$ - -#ifndef CIAO_SERVANT_IMPL_T_C -#define CIAO_SERVANT_IMPL_T_C - -#include "Servant_Impl_T.h" -#include "CCM_EntityContextC.h" - -namespace CIAO -{ - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::Servant_Impl ( - EXEC * exe, - Components::CCMHome_ptr home, - Home_Servant_Impl_Base *home_servant, - Session_Container * c - ) - : Servant_Impl_Base (home, home_servant, c), - activated_ (false), - pre_activated_ (false), - post_activated_ (false), - executor_ (EXEC::_duplicate (exe)) - { - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::~Servant_Impl (void) - { - // ********************************************************************** - /* - ACE_TRY_NEW_ENV - { - ::Components::SessionComponent_var scom = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_TRY_CHECK; - - if (! ::CORBA::is_nil (scom.in ())) - { - scom->ccm_remove (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - ACE_CATCHANY - { - } - ACE_ENDTRY; - */ - // ********************************************************************* - - this->context_->_remove_ref (); - } - - // Operations for CCMObject interface. - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - CORBA::Boolean - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::same_component ( - CORBA::Object_ptr object_ref - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (::CORBA::is_nil (object_ref)) - { - ACE_THROW_RETURN (::CORBA::BAD_PARAM (), 0); - } - - ::CORBA::Object_var the_other = - object_ref->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - ::CORBA::Object_var me = - this->context_->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return me->_is_equivalent (the_other.in () - ACE_ENV_ARG_PARAMETER); - - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - ::Components::CCMHome_ptr - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::get_ccm_home ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->context_->get_CCM_home (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - Components::SessionComponent_ptr - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::get_executor ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK_RETURN (Components::SessionComponent::_nil ()); - return temp._retn (); - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - CORBA::Object_ptr - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::_get_component ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionContext_var sc = - ::Components::SessionContext::_narrow ( - this->context_ - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK_RETURN (::CORBA::Object::_nil ()); - - if (! ::CORBA::is_nil (sc.in ())) - { - return sc->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ::Components::EntityContext_var ec = - ::Components::EntityContext::_narrow ( - this->context_ - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK_RETURN (::CORBA::Object::_nil ()); - - if (! ::CORBA::is_nil (ec.in ())) - { - return ec->get_CCM_object (ACE_ENV_SINGLE_ARG_PARAMETER); - } - - ACE_THROW_RETURN (CORBA::INTERNAL (), - ::CORBA::Object::_nil ()); - } - - // CIAO-specific operations. - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - void - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::activate_component ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - if (this->is_activated () == 0) - { - this->ciao_preactivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->ciao_activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->ciao_postactivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - void - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::ciao_preactivate ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK; - - if (! ::CORBA::is_nil (temp.in ())) - { - if (this->pre_activated_ == 0) - { - this->pre_activated_ = 1; - temp->ciao_preactivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - void - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::ciao_activate ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK; - - if (! ::CORBA::is_nil (temp.in ())) - { - if (this->activated_ == 0) - { - this->activated_ = 1; - temp->ccm_activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - void - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::ciao_postactivate ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK; - - if (! ::CORBA::is_nil (temp.in ())) - { - if (this->post_activated_ == 0) - { - this->post_activated_ = 1; - temp->ciao_postactivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - } - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - CORBA::Boolean - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::is_activated ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->pre_activated_; - } - - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - void - Servant_Impl<BASE_SKEL, EXEC, CONTEXT>::ciao_passivate ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - // @@ Jai, could you please see why this is required? - ::Components::SessionComponent_var temp = - ::Components::SessionComponent::_narrow ( - this->executor_.in () - ACE_ENV_ARG_PARAMETER - ); - ACE_CHECK; - - if (! ::CORBA::is_nil (temp.in ())) - temp->ccm_passivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->pre_activated_ = 0; - this->activated_ = 0; - this->post_activated_ = 0; - } -} - -#endif /* CIAO_SERVANT_IMPL_T_C */ diff --git a/CIAO/ciao/Servant_Impl_T.h b/CIAO/ciao/Servant_Impl_T.h deleted file mode 100644 index ac9ded8b267..00000000000 --- a/CIAO/ciao/Servant_Impl_T.h +++ /dev/null @@ -1,125 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Servant_Impl_T.h - * - * $Id$ - * - * This file contains the declaration of a mixin base class for - * the generated servant class. - * - * @authors Boris Kolpackov <boris@dre.vanderbilt.edu> - * Jeff Parsons <j.parsons@vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_SERVANT_IMPL_T_H -#define CIAO_SERVANT_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "Servant_Impl_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - class Session_Container; - - /** - * @class Servant_Impl - * - * @brief Mixin base class for generated servant. - * - * This class implements navigation and other operations - * common to all generated servants. - */ - template <typename BASE_SKEL, - typename EXEC, - typename CONTEXT> - class Servant_Impl : public virtual BASE_SKEL, - public virtual Servant_Impl_Base - { - public: - Servant_Impl (EXEC * exe, - Components::CCMHome_ptr home, - Home_Servant_Impl_Base *home_servant, - Session_Container * c); - - virtual ~Servant_Impl (void); - - // Operations for CCMObject interface. - - virtual CORBA::Boolean - same_component (CORBA::Object_ptr object_ref - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::CCMHome_ptr - get_ccm_home (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr - _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual Components::SessionComponent_ptr - get_executor (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - // CIAO-specific operations. - - void - ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - ciao_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - /// @@NOTE: The busted operation. - void - ciao_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - CORBA::Boolean - is_activated (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - activate_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - - CORBA::Boolean activated_; - CORBA::Boolean pre_activated_; - CORBA::Boolean post_activated_; - - /// Initialized in this constructor. - typename EXEC::_var_type executor_; - - /// Initialized in the derived, generated servant constructor. - CONTEXT * context_; - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Servant_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Servant_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_SERVANT_IMPL_T_H */ diff --git a/CIAO/ciao/Servant_Impl_Utils_T.cpp b/CIAO/ciao/Servant_Impl_Utils_T.cpp deleted file mode 100644 index ba292da07ea..00000000000 --- a/CIAO/ciao/Servant_Impl_Utils_T.cpp +++ /dev/null @@ -1,164 +0,0 @@ -// $Id$ - -#ifndef CIAO_SERVANT_IMPL_UTILS_T_C -#define CIAO_SERVANT_IMPL_UTILS_T_C - -#include "Servant_Impl_Base.h" -#include "ciao/Cookies.h" - -namespace CIAO -{ - template<typename T_var> - void - Servant_Impl_Base::describe_simplex_receptacle ( - const char *port_name, - const char *port_type_repo_id, - T_var &connection, - ::Components::ReceptacleDescriptions_var &descriptions, - CORBA::ULong slot - ) - { - ::Components::ReceptacleDescription *elem = 0; - ACE_NEW (elem, - ::OBV_Components::ReceptacleDescription); - ::Components::ReceptacleDescription_var safe_elem = elem; - - elem->name (port_name); - elem->type_id (port_type_repo_id); - elem->is_multiple (false); - elem->connections ().length (1UL); - - ::Components::ConnectionDescription *conn = 0; - ACE_NEW (conn, ::OBV_Components::ConnectionDescription); - ::Components::ConnectionDescription_var safe_conn = conn; - - conn->ck (0); - conn->objref (connection.in ()); - - elem->connections ()[0UL] = safe_conn._retn (); - descriptions[slot] = safe_elem._retn (); - } - - template<typename T_var> - void - Servant_Impl_Base::describe_multiplex_receptacle ( - const char *port_name, - const char *port_type_repo_id, - ACE_Active_Map_Manager<T_var> &objrefs, - ::Components::ReceptacleDescriptions_var &descriptions, - CORBA::ULong slot - ) - { - ::Components::ReceptacleDescription *elem = 0; - ACE_NEW (elem, - ::OBV_Components::ReceptacleDescription); - ::Components::ReceptacleDescription_var safe_elem = elem; - - elem->name (port_name); - elem->type_id (port_type_repo_id); - elem->is_multiple (true); - elem->connections ().length (objrefs.current_size ()); - - CORBA::ULong map_slot = 0UL; - ::Components::ConnectionDescription *conn = 0; - - for (typename ACE_Active_Map_Manager<T_var>::CONST_ITERATOR iter ( - objrefs - ); - 0 == iter.done (); - iter.advance (), ++map_slot) - { - ACE_NEW (conn, - ::OBV_Components::ConnectionDescription); - ::Components::ConnectionDescription_var safe_conn = conn; - - ::Components::Cookie *cookie_from_key = 0; - ACE_NEW (cookie_from_key, - ::CIAO::Map_Key_Cookie ((*iter).ext_id_)); - - // Valuetype member set operation calls add_ref. - conn->ck (cookie_from_key); - CORBA::remove_ref (cookie_from_key); - - conn->objref ((*iter).int_id_.in ()); - - elem->connections ()[map_slot] = safe_conn._retn (); - } - - descriptions[slot] = safe_elem._retn (); - } - - template<typename T_var> - void - Servant_Impl_Base::describe_pub_event_source ( - const char *port_name, - const char *port_type_repo_id, - ACE_Active_Map_Manager<T_var> &consumers, - ::Components::PublisherDescriptions_var &descriptions, - CORBA::ULong slot - ) - { - ::Components::PublisherDescription *elem = 0; - ACE_NEW (elem, - ::OBV_Components::PublisherDescription); - ::Components::PublisherDescription_var safe_elem = elem; - - elem->name (port_name); - elem->type_id (port_type_repo_id); - elem->consumer ().length (consumers.current_size ()); - - CORBA::ULong map_slot = 0UL; - ::Components::SubscriberDescription *sub = 0; - - for (typename ACE_Active_Map_Manager<T_var>::CONST_ITERATOR iter ( - consumers - ); - 0 == iter.done (); - iter.advance (), ++map_slot) - { - ACE_NEW (sub, - ::OBV_Components::SubscriberDescription); - ::Components::SubscriberDescription_var safe_sub = sub; - - ::Components::Cookie *cookie_from_key = 0; - ACE_NEW (cookie_from_key, - ::CIAO::Map_Key_Cookie ((*iter).ext_id_)); - - // Valuetype member set operation calls add_ref. - sub->ck (cookie_from_key); - CORBA::remove_ref (cookie_from_key); - - sub->consumer ((*iter).int_id_.in ()); - - elem->consumer ()[map_slot] = safe_sub._retn (); - } - - descriptions[slot] = safe_elem._retn (); - } - - template<typename T_var> - void - Servant_Impl_Base::describe_emit_event_source ( - const char *port_name, - const char *port_type_repo_id, - T_var &consumer_ref, - ::Components::EmitterDescriptions_var &descriptions, - CORBA::ULong slot - ) - { - ::Components::EmitterDescription *elem = 0; - ACE_NEW (elem, - ::OBV_Components::EmitterDescription); - ::Components::EmitterDescription_var safe_elem = elem; - - elem->name (port_name); - elem->type_id (port_type_repo_id); - - // Valuetype 'set' call increments the reference count. - elem->consumer (consumer_ref.in ()); - - descriptions[slot] = safe_elem._retn (); - } -} - -#endif /* CIAO_SERVANT_IMPL_T_C */ diff --git a/CIAO/ciao/ServerResources.idl b/CIAO/ciao/ServerResources.idl deleted file mode 100644 index 2269357ce38..00000000000 --- a/CIAO/ciao/ServerResources.idl +++ /dev/null @@ -1,237 +0,0 @@ -// $Id$ - -/** - * @file ServerResources.idl - * - * @brief A collection of IDL data types for - * - * @author Nanbor Wang - */ - -#if !defined (CIAO_SERVERRESOURCES_IDL) -#define CIAO_SERVERRESOURCES_IDL - -#include <orb.idl> - -module CIAO -{ - module DAnCE - { - /** - * @brief A single command line argument corresponds to a string as - * in the case of "argv". - */ - typedef string CommandlineArg; - /** - * @brief A list of command line arguments which a - * NodeApplicationManager will use to start up the NodeApplication - * this list is associated to. The command line arguments will be - * appended to the command line in order. - */ - typedef sequence<CommandlineArg> CommandlineArgs; - - /** - * @brief A string containing the filename of the svc.conf file the - * NodeApplication uses. The current approach of specifying - * svc.conf filename directly some harder problems such as - * distribution of svc.conf files and the relative/absolute path to - * the svc.conf file (the ServerResrouces xml document will have to - * assume the svc.conf file will be available at specific location.) - */ - typedef string SvcconfURI; - - /** - * @breif enumeration of ORB Resource Types (ORT) supported in RT - * extension. - */ - enum ORBResourceType - { - ORT_THREADPOOL, - ORT_THREADPOOLWITHLANES, - ORT_CONNECTIONBANDS - }; - - typedef short Priority; - - /** - * @brief Define a threadpool resource that an ORB must provide - */ - struct ORS_Threadpool - { - string Id; - unsigned long stacksize; - unsigned long static_threads; - unsigned long dynamic_threads; - Priority default_priority; - boolean allow_request_buffering; - unsigned long max_buffered_requests; - unsigned long max_request_buffer_size; - }; - - typedef sequence<ORS_Threadpool> ORS_ThreadpoolSeq; - - /** - * @brief Defines the configuration of a threadpool lane. We need - * to redefine it here to avoid dependency to RTCORBA library. - */ - struct ORS_ThreadpoolLane - { - Priority lane_priority; - unsigned long static_threads; - unsigned long dynamic_threads; - }; - - /** - * @brief Defines a set of threadpool lanes. We need - * to redefine it here to avoid dependency to RTCORBA library. - */ - typedef sequence<ORS_ThreadpoolLane> ORS_ThreadpoolLanes; - - /** - * @brief Defines a Threadpool with Lanes resource that an ORB - * must provide. - */ - struct ORS_ThreadpoolWithLanes - { - string Id; - unsigned long stacksize; - ORS_ThreadpoolLanes threadpool_lanes; - boolean allow_borrowing; - boolean allow_request_buffering; - unsigned long max_buffered_requests; - unsigned long max_request_buffer_size; - }; - - typedef sequence<ORS_ThreadpoolWithLanes> ORS_ThreadpoolWithLanesSeq; - - /** - * @brief Define a priority band for BandedConnection policies. - */ - struct ORS_PriorityBand - { - Priority low; - Priority high; - }; - /** - * @brief Define a list of priority bands for BandedConnection - * policies. - */ - typedef sequence<ORS_PriorityBand> ORS_PriorityBands; - - /** - * @brief Define the information needed to create a - * BandedConnection policy. This info can be referred to via its - * name (Id). - */ - struct ORS_ConnectionBands - { - string Id; - ORS_PriorityBands bands; - }; - - typedef sequence<ORS_ConnectionBands> ORS_ConnectionBandsSeq; - - /** - * @brief Collection of resources managed by the NodeApplication - * ORB. - */ - struct ORBResource - { - ORS_ThreadpoolSeq threadpool_list; - - ORS_ThreadpoolWithLanesSeq threadpool_with_lanes_list; - - ORS_ConnectionBandsSeq connection_bands_list; - }; - - typedef sequence<ORBResource, 1> ORBResources; - - // ================================================================= - - /** - * @brief PolicyType supported by DAnCE extension. Again, we are - * redefining these value to avoid dependencies to various ORB - * modules such as RTCORBA. - */ - const CORBA::PolicyType PRIORITY_MODEL_POLICY_TYPE = 40; - const CORBA::PolicyType THREADPOOL_POLICY_TYPE = 41; - const CORBA::PolicyType PRIORITY_BANDED_CONNECTION_POLICY_TYPE = 45; - - enum PriorityModel - { - CLIENT_PROPAGATED, - SERVER_DECLARED - }; - - /** - * @brief Defines data required for creating a PriorityModel Policy - */ - struct PriorityModelPolicyDef - { - PriorityModel priority_model; - Priority server_priority; - }; - - /** - * @brief Define data required for creating a Threadpool policy - */ - struct ThreadpoolPolicyDef - { - string Id; // Threadpool name defined in - // ORBResource - }; - - /** - * @brief Define data required for creating a PriorityBandedConnection - * policy - */ - struct PriorityBandedConnectionPolicyDef - { - string Id; // PriorityBands name defined in - // ORBResource - }; - - union PolicyDef switch (CORBA::PolicyType) - { - case 40: PriorityModelPolicyDef PriorityModelDef; - case 41: ThreadpoolPolicyDef ThreadpoolDef; - case 45: PriorityBandedConnectionPolicyDef PriorityBandedConnectionDef; - }; - - /** - * @brief Define a set of policy definitions. - */ - typedef sequence<PolicyDef> PolicyDefs; - - /** - * @brief A policy set is named. - */ - struct PolicySet - { - string Id; // Name of this policy set - PolicyDefs policies; - }; - - /** - * @brief A list of all policy sets. - */ - typedef sequence<PolicySet> PolicySets; - - struct ORBConfigs - { - ORBResources orb_resources; - PolicySets policy_set; - }; - - struct ServerResource - { - string Id; - - CommandlineArgs args; - SvcconfURI svcconf; - ORBConfigs orb_config; - }; - }; -}; - -#endif /* CIAO_SERVERRESOURCES_IDL */ diff --git a/CIAO/ciao/Server_init.cpp b/CIAO/ciao/Server_init.cpp deleted file mode 100644 index 8e1428382d0..00000000000 --- a/CIAO/ciao/Server_init.cpp +++ /dev/null @@ -1,239 +0,0 @@ -// $Id$ - -#include "Server_init.h" -#include "CIAO_common.h" -#include "CCM_ComponentC.h" -#include "CCM_StandardConfiguratorC.h" -#include "Cookies.h" - -#include "ace/OS_NS_stdio.h" -namespace CIAO -{ - int - Server_init (CORBA::ORB_ptr o) - { - CIAO_REGISTER_VALUE_FACTORY (o, CIAO::Map_Key_Cookie_init, - Components::Cookie); - CIAO_REGISTER_VALUE_FACTORY (o, Components::PortDescription_init, - Components::PortDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::FacetDescription_init, - Components::FacetDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConnectionDescription_init, - Components::ConnectionDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ReceptacleDescription_init, - Components::ReceptacleDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConsumerDescription_init, - Components::ConsumerDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::EmitterDescription_init, - Components::EmitterDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::SubscriberDescription_init, - Components::SubscriberDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::PublisherDescription_init, - Components::PublisherDescription); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ConfigValue_init, - Components::ConfigValue); - CIAO_REGISTER_VALUE_FACTORY (o, Components::ComponentPortDescription_init, - Components::ComponentPortDescription); - return 0; - } - - namespace Utility - { - int write_IOR (const char *pathname, - const char *ior) - { - FILE* ior_output_file_ = - ACE_OS::fopen (pathname, "w"); - - if (ior_output_file_) - { - ACE_OS::fprintf (ior_output_file_, - "%s", - ior); - ACE_OS::fclose (ior_output_file_); - return 0; - } - - return -1; - } - - // -------------------------------------------------------------- - // Implementation of NameUtility class - // -------------------------------------------------------------- - - void NameUtility::CreateContextPath (const CosNaming::NamingContextExt_ptr nc, - const CosNaming::Name& name) - { - bool isNotFound = false; - CORBA::ULong lengthMissing = 0; - CORBA::ULong OriginalLength = name.length(); - CosNaming::Name tmpName; - - CosNaming::NamingContext_var tmpCtxVar; - - ACE_TRY - { - tmpCtxVar = nc->bind_new_context(name); - ACE_DEBUG ((LM_DEBUG, "Bound Context.\n\n")); - } - ACE_CATCH (CosNaming::NamingContext::AlreadyBound, ex) - { - ACE_DEBUG ((LM_DEBUG, "Context Already Bound.\n\n")); - } - ACE_CATCH (CosNaming::NamingContext::NotFound, nf) - { - ACE_DEBUG ((LM_DEBUG, "Context not found.\n\n")); - isNotFound = true; - lengthMissing = nf.rest_of_name.length(); - } - ACE_ENDTRY; - - if (lengthMissing == name.length()) - { - ACE_ERROR ((LM_ERROR, "Null name length.\n\n")); - } - - if (isNotFound) - { - for (CORBA::ULong l = OriginalLength-lengthMissing; - l < OriginalLength; - l++) - { - tmpName.length(l+1); - for (CORBA::ULong i=0; i <= l; i++) - { - tmpName[i] = name[i]; - - CORBA::String_var newSCName = nc->to_string(tmpName); - ACE_DEBUG ((LM_DEBUG, "What's left of the name:%s\n", - newSCName.in ())); - } - - tmpCtxVar = nc->bind_new_context(tmpName); - ACE_DEBUG ((LM_DEBUG, "Bound New Context.\n")); - } - } - } - - //--------------------------------------------------------------------------------------------- - void NameUtility::BindObjectPath (const CosNaming::NamingContextExt_ptr nc, - const CosNaming::Name& name, - const CORBA::Object_var obj) - { - CosNaming::Name tmpName; - CORBA::String_var newSCName = nc->to_string(name); - ACE_DEBUG ((LM_DEBUG, "The name is: %s\n", newSCName.in ())); - - ACE_TRY - { - nc->rebind(name, obj); - } - - ACE_CATCH (CosNaming::NamingContext::NotFound, ex ) - { - ACE_DEBUG ((LM_DEBUG, "Name not found, doing new bind.\n")); - nc->bind(name, obj); - } - ACE_ENDTRY; - } - - //--------------------------------------------------------------------------------------------- - CosNaming::BindingList * - NameUtility::listBindings (const CosNaming::NamingContext_ptr nc, - const CosNaming::Name& name, - CORBA::ULong max_list_size) - { - CosNaming::BindingList_var basicListV; - CosNaming::BindingIterator_var bIterV; - - CORBA::Object_var objV; - CosNaming::NamingContext_var tmpContextV; - - if (name.length()==0) - { - tmpContextV = CosNaming::NamingContext::_duplicate(nc); - } - else - { - objV = nc->resolve(name); - tmpContextV = CosNaming::NamingContext::_narrow(objV.in ()); - } - if (CORBA::is_nil(tmpContextV.in ())) - { - ACE_ERROR ((LM_ERROR, "listBindings: Nil context.\n")); - return 0; - } - - tmpContextV->list(max_list_size, basicListV.out(), bIterV.out()); - - CORBA::Long max_remaining = max_list_size - basicListV->length(); - CORBA::Boolean moreBindings = !CORBA::is_nil(bIterV.in ()); - - if (moreBindings) - { - while (moreBindings && (max_remaining > 0) ) - { - CosNaming::BindingList_var tmpListV; - - moreBindings = bIterV->next_n(max_remaining, tmpListV.out()); - - //Append 'tmpListV' to 'basicListV' - CORBA::ULong basicListLen = basicListV->length(); - basicListV->length(basicListLen+tmpListV->length()); - for (CORBA::ULong i=0; i < tmpListV->length(); i++) - { - (*basicListV)[i+basicListLen] = (*tmpListV)[i]; - } - - //Re-calculate 'max_remaining' - max_remaining = max_list_size - basicListV->length(); - } - bIterV->destroy(); - } - - return basicListV._retn(); - } - - //--------------------------------------------------------------------------------------------- - void - NameUtility::recursiveUnbind (const CosNaming::NamingContext_ptr nc, - const CosNaming::Name& name) - { - CORBA::Object_var objV; - CosNaming::NamingContext_var tmpContextV; - - objV = nc->resolve(name); - tmpContextV = CosNaming::NamingContext::_narrow(objV.in ()); - if (CORBA::is_nil(tmpContextV.in ())) - { - ACE_ERROR ((LM_ERROR, "recursiveUnbind: Nil context reference.\n")); - return; - } - - CosNaming::BindingList_var blV; - CosNaming::Name tmpName; - tmpName.length(0); - - blV = NameUtility::listBindings(tmpContextV.in(), - tmpName, - 10000); // 'max_list_size' - - for (CORBA::ULong i=0; i<blV->length(); i++) - { - tmpName = (*blV)[i].binding_name; - - if ((*blV)[i].binding_type==CosNaming::nobject) - { - tmpContextV->unbind(tmpName); - } - else if ( (*blV)[i].binding_type==CosNaming::ncontext) - { - NameUtility::recursiveUnbind(tmpContextV.in(), tmpName); - } - } - nc->unbind(name); - tmpContextV->destroy(); - } - - } /* namespace Utility */ -} /* namespace CIAO */ diff --git a/CIAO/ciao/Server_init.h b/CIAO/ciao/Server_init.h deleted file mode 100644 index c5fe53ed77d..00000000000 --- a/CIAO/ciao/Server_init.h +++ /dev/null @@ -1,91 +0,0 @@ -// $Id$ - -/** - * @file Server_init.h - * - * Initializing CIAO Server side ORB, if they need to. - * I'm also puting some utilities functions here. - * - * @author Nanbor Wang <nanbor@cs.wustl.edu> - * @author Gan Deng <dengg@dre.vanderbilt.edu> - */ - -#ifndef CIAO_SERVER_INIT_H -#define CIAO_SERVER_INIT_H -#include /**/ "ace/pre.h" - -#include "CIAO_Server_Export.h" -#include "tao/Versioned_Namespace.h" -#include <orbsvcs/CosNamingC.h> - -#if !defined ACE_LACKS_PRAGMA_ONCE -#pragma once -#endif /* ! ACE_LACKS_PRAGMA_ONCE */ - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL -namespace CORBA -{ - class ORB; - typedef ORB *ORB_ptr; -} -TAO_END_VERSIONED_NAMESPACE_DECL - -namespace CIAO -{ - /** - * The initialize routine for any server that need to access - * component. This routine now simply registers various valuetype - * factories defined in CIAO_Component.pidl. Currently, this method - * should be call right after ORB initialization but we should try - * to register these stuff automatically. - */ - CIAO_SERVER_Export int Server_init (CORBA::ORB_ptr o); - - namespace Utility - { - /// Write a string (usually a stringified IOR) to a file - /// designated by the @c pathname. The file named will always get - /// overwritten. - CIAO_SERVER_Export int write_IOR (const char *pathname, - const char *IOR); - - class CIAO_SERVER_Export NameUtility - { - /** - * A utility class to bind naming context. This class is contributed by - * Dipa Suri <dipa.suri@lmco.com>. - * - * The concept/code are derived from - * http://www.informit.com/articles/article.asp?p=23266&seqNum=6 - */ - - public: - /// For each 'NameComponent' in 'name', create a corresponding 'NamingContext'. - static void CreateContextPath (const CosNaming::NamingContextExt_ptr, - const CosNaming::Name &); - - /// For the first [0, length-2] NameComponents of 'name', create a - /// corresponding 'NamingContext'. - /// For the length-1 NameComponent of 'name', bind it to the object - /// reference 'obj'. - static void BindObjectPath (const CosNaming::NamingContextExt_ptr, - const CosNaming::Name&, - const CORBA::Object_var); - - /// Get a list of all bindings under the given context, up to - /// max_list_size. - static CosNaming::BindingList * listBindings (const CosNaming::NamingContext_ptr, - const CosNaming::Name&, - CORBA::ULong); - - /// Recursively unbind all objects and contexts below the given name - /// context, given the initial context nc. - /// Assumes a tree shape to service (not cyclic) - static void recursiveUnbind (const CosNaming::NamingContext_ptr, - const CosNaming::Name&); - }; - } -} - -#include /**/ "ace/post.h" -#endif /* CIAO_SERVER_INIT_H */ diff --git a/CIAO/ciao/StandardConfigurator_Impl.cpp b/CIAO/ciao/StandardConfigurator_Impl.cpp deleted file mode 100644 index ae39266cf6b..00000000000 --- a/CIAO/ciao/StandardConfigurator_Impl.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// StandardConfigurator.cpp,v 1.0 2004/14/04 08:47:46 white Exp - -#include "StandardConfigurator_Impl.h" -#include "Servant_Impl_Base.h" - -ACE_RCSID (ciao, - StandardConfigurator_Impl, - "$Id$") - - -namespace CIAO -{ - StandardConfigurator_Impl::StandardConfigurator_Impl ( - Servant_Impl_Base* servant) - : component_ (servant) - { - } - - StandardConfigurator_Impl::~StandardConfigurator_Impl () - { - } - - void - StandardConfigurator_Impl::set_configuration ( - const Components::ConfigValues &descr - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->component_->set_attributes (descr - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - StandardConfigurator_Impl::configure ( - Components::CCMObject_ptr - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::WrongComponentType)) - { - - } -} diff --git a/CIAO/ciao/StandardConfigurator_Impl.h b/CIAO/ciao/StandardConfigurator_Impl.h deleted file mode 100644 index 558137b64d5..00000000000 --- a/CIAO/ciao/StandardConfigurator_Impl.h +++ /dev/null @@ -1,77 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file StandardConfigurator_Impl.h - * - * $Id$ - * - * This file contains implementation for the servant of - * Components::StandardConfigurator interface. - * - * @author Jules White <jules@dre.vanderbilt.edu> - */ -//============================================================================= - - -#ifndef CIAO_STANDARDCONFIGURATOR_IMPL_H -#define CIAO_STANDARDCONFIGURATOR_IMPL_H -# include /**/ "ace/pre.h" - -#include "CCM_StandardConfiguratorS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "CIAO_Server_Export.h" -#include "Servant_Impl_Base.h" - -namespace CIAO -{ - - - /** - * @class StandardConfigurator_Impl - * - * @brief Servant implementation for Components::StandardConfigurator - * - * This class implements the Components::StandardConfigurator - * interface as defined by the CCM spcification. This class aids - * in setting the initial values of component attributes that are - * defined in the meta data. - */ - class CIAO_SERVER_Export StandardConfigurator_Impl - : public virtual POA_Components::StandardConfigurator - { - public: - /// Constructor - StandardConfigurator_Impl (Servant_Impl_Base* toconfigure); - - /// Destructor - virtual ~StandardConfigurator_Impl (void); - - /// This method will call set_attributes on the component that is - /// being configured, i.e, the template method from - /// StandardConfigurator interface. - virtual void set_configuration ( - const Components::ConfigValues & descr - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void configure ( - Components::CCMObject_ptr comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::WrongComponentType)); - - private: - /// The component whose attributes are going to be configured via - /// set_attributes - Servant_Impl_Base* component_; - }; - -} - -#include /**/ "ace/post.h" -#endif /* CIAO_STANDARDCONFIGURATOR_IMPL_H */ diff --git a/CIAO/ciao/SwapExec.idl b/CIAO/ciao/SwapExec.idl deleted file mode 100644 index 94aa99efd65..00000000000 --- a/CIAO/ciao/SwapExec.idl +++ /dev/null @@ -1,12 +0,0 @@ -// $Id$ - -#include "CCM_EnterpriseComponent.idl" - -module CIAO -{ - local interface Swap_Exec : ::Components::EnterpriseComponent - { - Components::EnterpriseComponent incarnate (); - Components::EnterpriseComponent etherealize (); - }; -}; diff --git a/CIAO/ciao/Swapping_Container.cpp b/CIAO/ciao/Swapping_Container.cpp deleted file mode 100644 index d7539ed21f2..00000000000 --- a/CIAO/ciao/Swapping_Container.cpp +++ /dev/null @@ -1,303 +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" - -#if !defined (__ACE_INLINE__) -# include "Swapping_Container.inl" -#endif /* __ACE_INLINE__ */ - -namespace CIAO -{ - - ACE_Atomic_Op <ACE_SYNCH_MUTEX, unsigned long> - Swapping_Container::serial_number_ (0); - - Swapping_Container::Swapping_Container (CORBA::ORB_ptr o, - Container_Impl *container_impl) - : Session_Container (o, container_impl), - number_ (0) - { - } - - Swapping_Container::~Swapping_Container () - { - } - - PortableServer::POA_ptr - Swapping_Container::the_home_servant_POA (void) const - { - return this->home_servant_poa_.in (); - } - - CORBA::Object_ptr - Swapping_Container::get_home_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - return this->the_home_servant_POA ()->servant_to_reference (p - ACE_ENV_ARG_PARAMETER); - } - - void - Swapping_Container::deactivate_facet (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - this->the_facet_cons_POA ()->deactivate_object (oid - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - 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_servant_POA (name, - more_policies, - root_poa.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - - - this->create_home_servant_POA ("home servant POA", - more_policies, - root_poa.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); - - this->create_connections_POA (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::add_servant_map - (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant) - { - this->dsa_->add_servant_map (oid, servant); - } - - void - Swapping_Container::delete_servant_map - (PortableServer::ObjectId &oid) - { - this->dsa_->delete_servant_map (oid); - } - - void - Swapping_Container::create_home_servant_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; - - - this->home_servant_poa_ = - root->create_POA (name, - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - void - Swapping_Container::create_connections_POA ( - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL) - { - PortableServer::POAManager_var poa_manager = - root->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - TAO::Utils::PolicyList_Destroyer policies (3); - policies.length (3); - - policies[0] = - root->create_id_assignment_policy (PortableServer::USER_ID - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policies[1] = - root->create_request_processing_policy - (PortableServer::USE_SERVANT_MANAGER - ACE_ENV_ARG_PARAMETER); - - ACE_CHECK; - - // Servant Retention Policy - policies[2] = - root->create_servant_retention_policy (PortableServer::RETAIN - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->facet_cons_poa_ = - root->create_POA ("facet_consumer_poa", - poa_manager.in (), - policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - ACE_NEW_THROW_EX (this->sa_, - Servant_Activator (this->orb_.in ()), - CORBA::NO_MEMORY ()); - - this->facet_cons_poa_->set_servant_manager ( - this->sa_ - ACE_ENV_ARG_PARAMETER); - - ACE_CHECK; - } - - void - Swapping_Container::create_servant_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL) - { - // @@ Jai, see how this method more or less does things (like - // setting policies) like create_connections_POA (). Could you - // please refactor them into a seperate method? - 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; - - policy_length = policies.length (); - policies.length (policy_length + 1); - policies[policy_length] = - root->create_request_processing_policy ( - PortableServer::USE_SERVANT_MANAGER - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - policy_length = policies.length (); - 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; - - } - - void - Swapping_Container::ciao_uninstall_home (Components::CCMHome_ptr homeref - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - PortableServer::POA_ptr tmp = this->home_servant_poa_.in (); - PortableServer::ObjectId_var oid = - tmp->reference_to_id (homeref - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - tmp->deactivate_object (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - CORBA::Object_ptr - Swapping_Container::install_servant (PortableServer::Servant p, - Container::OA_Type t - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - PortableServer::POA_ptr tmp = 0; - - if (t == Container::Component) - { - tmp = this->home_servant_poa_.in (); - } - else - tmp = this->facet_cons_poa_.in (); - - PortableServer::ObjectId_var oid - = tmp->activate_object (p - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - CORBA::Object_var objref - = tmp->id_to_reference (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - - return objref._retn (); - } -} diff --git a/CIAO/ciao/Swapping_Container.h b/CIAO/ciao/Swapping_Container.h deleted file mode 100644 index 99be4aa474f..00000000000 --- a/CIAO/ciao/Swapping_Container.h +++ /dev/null @@ -1,134 +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" - -// @@ Jai, are all these inclusions necessary? Please cut down on them -// to a minimum -#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" -#include "ciao/Servant_Activator.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -namespace CIAO -{ - class Dynamic_Component_Servant_Base; - - class CIAO_SERVER_Export Swapping_Container : public Session_Container - { - public: - - Swapping_Container (CORBA::ORB_ptr o, Container_Impl *container_impl); - - 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)); - - virtual CORBA::Object_ptr install_servant (PortableServer::Servant p, - Container::OA_Type t - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr get_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void ciao_uninstall_home (Components::CCMHome_ptr homeref - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::Object_ptr get_home_objref (PortableServer::Servant p - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void add_servant_map (PortableServer::ObjectId &oid, - Dynamic_Component_Servant_Base* servant); - - virtual void delete_servant_map (PortableServer::ObjectId &oid); - - virtual void deactivate_facet (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - PortableServer::POA_ptr the_home_servant_POA (void) const; - - private: - - /// Create POA for the component. - void create_servant_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL); - - void create_home_servant_POA (const char *name, - const CORBA::PolicyList *p, - PortableServer::POA_ptr root - ACE_ENV_ARG_DECL); - - void create_connections_POA (PortableServer::POA_ptr root - ACE_ENV_ARG_DECL); - protected: - unsigned long number_; - - /// Static variable to store the highest number we have given out until - /// now - static ACE_Atomic_Op <ACE_SYNCH_MUTEX, unsigned 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. -// @@Jai, is this macro required here? -#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/CIAO/ciao/Swapping_Container.inl b/CIAO/ciao/Swapping_Container.inl deleted file mode 100644 index b2c00a33346..00000000000 --- a/CIAO/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/CIAO/ciao/Swapping_Servant_Home_Impl_Base.cpp b/CIAO/ciao/Swapping_Servant_Home_Impl_Base.cpp deleted file mode 100644 index d222e722818..00000000000 --- a/CIAO/ciao/Swapping_Servant_Home_Impl_Base.cpp +++ /dev/null @@ -1,39 +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 ( - ACE_ENV_SINGLE_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), - CORBA::IRObject::_nil ()); - } - - CORBA::IRObject_ptr - Swapping_Home_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/CIAO/ciao/Swapping_Servant_Home_Impl_Base.h b/CIAO/ciao/Swapping_Servant_Home_Impl_Base.h deleted file mode 100644 index 5e118476f18..00000000000 --- a/CIAO/ciao/Swapping_Servant_Home_Impl_Base.h +++ /dev/null @@ -1,67 +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 "CCM_HomeS.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ciao/CIAO_Server_Export.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_SERVER_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 (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_; - 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/Swapping_Servant_Home_Impl_T.cpp b/CIAO/ciao/Swapping_Servant_Home_Impl_T.cpp deleted file mode 100644 index 12e8fc49527..00000000000 --- a/CIAO/ciao/Swapping_Servant_Home_Impl_T.cpp +++ /dev/null @@ -1,244 +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_); - - ACE_TRY_NEW_ENV; - { - this->container_->delete_servant_map (oid ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY; - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "~Swapping_Home_Servant_Impl\t\n"); - } - ACE_ENDTRY; - - 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 - ACE_ENV_ARG_DECL_NOT_USED - ) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::RemoveFailure)) - { - 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 ( - 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 COMP_SVNT> - typename COMP_SVNT::_stub_ptr_type - Swapping_Home_Servant_Impl<BASE_SKEL, - EXEC, - 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_SVNT::_stub_type::_nil ()); - } - - - ::Components::EnterpriseComponent_var _ciao_ec = - this->executor_->create (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - return this->_ciao_activate_component (_ciao_ec.in () - ACE_ENV_ARG_PARAMETER); - } - - // 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 - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - CORBA::Object_var hobj = - this->container_->get_home_objref (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - Components::CCMHome_var home = - Components::CCMHome::_narrow (hobj.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - 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 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - Dynamic_Component_Servant_Base *svt = - new Dynamic_Component_Servant<COMP_SVNT> (ec, - home.in (), - this->ins_name_, - this, - this->container_); - - this->container_->add_servant_map (oid, svt ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - 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 () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (COMP_SVNT::_stub_type::_nil ()); - - 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 - 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_.find (oid.in (), servant) == 0) - { - PortableServer::ServantBase_var safe (servant); - - servant->ciao_passivate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - - this->component_map_.unbind (oid.in ()); - } - } -} - -#endif /* CIAO_SWAPPING_SERVANT_IMPL_T_C */ diff --git a/CIAO/ciao/Swapping_Servant_Home_Impl_T.h b/CIAO/ciao/Swapping_Servant_Home_Impl_T.h deleted file mode 100644 index b438c6fc133..00000000000 --- a/CIAO/ciao/Swapping_Servant_Home_Impl_T.h +++ /dev/null @@ -1,132 +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 "tao/PortableServer/Key_Adapters.h" -#include "ace/Hash_Map_Manager_T.h" -#include "ciao/Dynamic_Component_Servant_Base.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 - 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 typename COMP_SVNT::_stub_ptr_type - create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - Components::CreateFailure)); - - 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 - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void - _ciao_passivate_component (typename COMP_SVNT::_stub_ptr_type comp - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - protected: - typename EXEC::_var_type executor_; - - ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - COMP_SVNT *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_SYNCH_MUTEX> - component_map_; - - typedef ACE_Hash_Map_Manager_Ex<PortableServer::ObjectId, - Dynamic_Component_Servant_Base *, - TAO_ObjectId_Hash, - ACE_Equal_To<PortableServer::ObjectId>, - ACE_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/TargetManager.idl b/CIAO/ciao/TargetManager.idl deleted file mode 100644 index e604a237161..00000000000 --- a/CIAO/ciao/TargetManager.idl +++ /dev/null @@ -1,36 +0,0 @@ -// $Id$ - -#ifndef TARGETMANAGER_IDL -#define TARGETMANAGER_IDL - -#include "Target_Data.idl" -#include "Deployment_TargetData.idl" - -module Deployment { - - enum DomainUpdateKind { - Add, - Delete, - UpdateAll, - UpdateAvailable - }; - - /** - * @todo The ResourceCommitmentManager is part of 06-04-01 and this is not - * part of the Target Manager yet - */ - interface TargetManager { - Domain getAllResources (); - Domain getAvailableResources (); - /// @todo 06-04-01 specifies this differently - void commitResources (in DeploymentPlan plan) - raises (ResourceNotAvailable, PlanError); - /// @todo This is not part of 06-04-01 - void releaseResources (in DeploymentPlan argname); - void updateDomain (in ::CORBA::StringSeq elements, - in Domain domainSubset, - in DomainUpdateKind updateKind); - }; -}; - -#endif /* TARGETMANAGER_IDL */ diff --git a/CIAO/ciao/Target_Data.idl b/CIAO/ciao/Target_Data.idl deleted file mode 100644 index 683f16dc2ff..00000000000 --- a/CIAO/ciao/Target_Data.idl +++ /dev/null @@ -1,24 +0,0 @@ -// $Id$ - -#ifndef TARGET_DATA_IDL -#define TARGET_DATA_IDL - -#include "Deployment_Data.idl" - -module Deployment { - - exception PlanError { - string name; - string reason; - }; - - exception ResourceNotAvailable { - string name; - string resourceType; - string propertyName; - string elementName; - string resourceName; - }; -}; - -#endif /* TARGET_DATA_IDL */ diff --git a/CIAO/ciao/UpgradeableContext.idl b/CIAO/ciao/UpgradeableContext.idl deleted file mode 100644 index 343c512abe6..00000000000 --- a/CIAO/ciao/UpgradeableContext.idl +++ /dev/null @@ -1,17 +0,0 @@ -// $Id$ - -#include "CCM_Container.idl" -#include "tao/PortableServer/PortableServer_include.pidl" - -module CIAO -{ - local interface UpgradeableContext : ::Components::SessionContext - { - ::Components::ConsumerDescriptions get_registered_consumers - (in ::Components::FeatureName publisher_name) - raises (::Components::InvalidName, ::Components::InvalidConnection); - void deactivate_facet (in PortableServer::ObjectId oid); - void update_port_activator (in PortableServer::ObjectId oid); - void remove_facet (in Object reference); - }; -}; diff --git a/CIAO/ciao/Upgradeable_Context_Impl_T.cpp b/CIAO/ciao/Upgradeable_Context_Impl_T.cpp deleted file mode 100644 index da7843974c4..00000000000 --- a/CIAO/ciao/Upgradeable_Context_Impl_T.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// $Id$ - -#ifndef CIAO_UPGRADEABLE_CONTEXT_IMPL_T_C -#define CIAO_UPGRADEABLE_CONTEXT_IMPL_T_C - -#include "Upgradeable_Context_Impl_T.h" - -namespace CIAO -{ - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - Upgradeable_Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>:: - Upgradeable_Context_Impl ( - Components::CCMHome_ptr home, - Session_Container *c, - SVNT *sv) - : session_context (home, c, sv), - servant_ (sv) - { - } - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - Upgradeable_Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>:: - ~Upgradeable_Context_Impl (void) - { - } - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - void - Upgradeable_Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>::deactivate_facet ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - /* - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (obj_id); - */ - - this->container_->deactivate_facet (oid ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - void - Upgradeable_Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>:: - remove_facet ( - CORBA::Object_ptr reference - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - PortableServer::ObjectId_var oid = - this->container_->the_facet_cons_POA ()->reference_to_id - (reference ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->update_port_activator (oid.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - this->deactivate_facet (oid.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - void - Upgradeable_Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR>:: - update_port_activator ( - const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) - { - /* - PortableServer::ObjectId_var oid = - PortableServer::string_to_ObjectId (obj_id); - */ - - CIAO::Servant_Activator *sa = - this->container_->ports_servant_activator (); - sa->update_port_activator (oid ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } - -} - -#endif /* CIAO_UPGRADEABLE_CONTEXT_IMPL_T_C */ diff --git a/CIAO/ciao/Upgradeable_Context_Impl_T.h b/CIAO/ciao/Upgradeable_Context_Impl_T.h deleted file mode 100644 index 18e5272b205..00000000000 --- a/CIAO/ciao/Upgradeable_Context_Impl_T.h +++ /dev/null @@ -1,90 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Upgradeable_Context_Impl_T.h - * - * $Id$ - * - */ -//============================================================================= - - -#ifndef CIAO_UPGRADEABLE_CONTEXT_IMPL_T_H -#define CIAO_UPGRADEABLE_CONTEXT_IMPL_T_H - -#include /**/ "ace/pre.h" - -#include "ciao/UpgradeableContextC.h" -#include "ciao/Context_Impl_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -TAO_BEGIN_VERSIONED_NAMESPACE_DECL -namespace CORBA -{ - class SystemException; -} -TAO_END_VERSIONED_NAMESPACE_DECL - -namespace CIAO -{ - template <typename BASE_CTX, - typename SVNT, - typename COMP, - typename COMP_VAR> - class Upgradeable_Context_Impl : public virtual Context_Impl< - BASE_CTX, SVNT, COMP, COMP_VAR> - { - public: - Upgradeable_Context_Impl (Components::CCMHome_ptr home, - Session_Container *c, - SVNT *sv); - - virtual ~Upgradeable_Context_Impl (void); - - virtual void - deactivate_facet (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - update_port_activator (const PortableServer::ObjectId &oid - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual void - remove_facet (CORBA::Object_ptr reference - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual ::Components::ConsumerDescriptions * - get_registered_consumers (const char *publisher_name - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC ((CORBA::SystemException, - ::Components::InvalidName, - ::Components::InvalidConnection)) = 0; - - protected: - SVNT *servant_; - COMP_VAR component_; - typedef Context_Impl<BASE_CTX, SVNT, COMP, COMP_VAR> session_context; - private: - /// Not to be used - Upgradeable_Context_Impl (void); - }; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Upgradeable_Context_Impl_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Upgradeable_Context_Impl_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* CIAO_UPGRADEABLE_CONTEXT_IMPL_T_H */ diff --git a/CIAO/ciao/Version.h b/CIAO/ciao/Version.h deleted file mode 100644 index a5583673907..00000000000 --- a/CIAO/ciao/Version.h +++ /dev/null @@ -1,9 +0,0 @@ -// -*- C++ -*- -// $Id$ - -// This is file was automatically generated by $ACE_ROOT/bin/make_release. - -#define CIAO_MAJOR_VERSION 0 -#define CIAO_MINOR_VERSION 5 -#define CIAO_BETA_VERSION 4 -#define CIAO_VERSION "0.5.4" |