diff options
author | dengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-01-17 23:05:36 +0000 |
---|---|---|
committer | dengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-01-17 23:05:36 +0000 |
commit | 6d2ce51fadde13121ce0c0aca93cebc313c079c4 (patch) | |
tree | 7f8dce25525fad0057cf2e03771d1509eb21ee82 | |
parent | 7dc1200f4d98fc8af5b8759d87dd8f21dfcdbfd0 (diff) | |
download | ATCD-6d2ce51fadde13121ce0c0aca93cebc313c079c4.tar.gz |
*** empty log message ***
24 files changed, 1461 insertions, 251 deletions
diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp index 69935b4f718..8b37739cd97 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.cpp @@ -6,9 +6,11 @@ namespace CIAO { Containers_Info_Map:: - Containers_Info_Map (const Deployment::DeploymentPlan & plan) + Containers_Info_Map (const Deployment::DeploymentPlan & plan, + CORBA::StringSeq shared_components) : map_ (CIAO_DEFAULT_MAP_SIZE), - plan_ (plan) + plan_ (plan), + shared_components_ (shared_components) { this->initialize_map (); this->build_map (); @@ -160,6 +162,12 @@ namespace CIAO const Deployment::InstanceDeploymentDescription & instance = this->plan_.instance[i]; + // If this component instance happens to be in the "shared components + // list", then we ignore it, otherwise we shall install it. + ACE_CString name (instance.name.in ()); + if (this->is_shared_component (name)) + continue; + if (! this->insert_instance_into_map (instance)) return false; } @@ -319,3 +327,17 @@ namespace CIAO return true; } } + +bool +CIAO::Containers_Info_Map:: +is_shared_component (ACE_CString & name) +{ + for (CORBA::ULong i = 0; i < this->shared_components_.length (); ++i) + { + if (ACE_OS::strcmp (this->shared_components_[i].in (), + name.c_str ()) == 0) + return true; + } + + return false; +} diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.h b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.h index 8776a0bc2fe..1471b8600df 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.h +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/Containers_Info_Map.h @@ -36,12 +36,29 @@ namespace CIAO { public: - Containers_Info_Map (const Deployment::DeploymentPlan & plan); + Containers_Info_Map (const Deployment::DeploymentPlan & plan, + CORBA::StringSeq shared_components); Deployment::ContainerImplementationInfos * containers_info (void); private: + void initialize_map (void); + bool build_map (void); + + bool insert_instance_into_map ( + const Deployment::InstanceDeploymentDescription & instance); + + bool insert_instance_into_container ( + const Deployment::InstanceDeploymentDescription & instance, + Deployment::ComponentImplementationInfos & impl_infos); + + /// Helper function to check wheather a component instance + /// is in the "shared components list". + bool is_shared_component (ACE_CString & name); + + //Deployment::ContainerImplementationInfos_var containers_info_; + typedef ACE_Hash_Map_Manager_Ex <ACE_CString, Deployment::ContainerImplementationInfo *, @@ -50,24 +67,13 @@ namespace CIAO ACE_Null_Mutex> MAP; typedef MAP::iterator Iterator; - MAP map_; const Deployment::DeploymentPlan & plan_; - //Deployment::ContainerImplementationInfos_var containers_info_; - - private: - - void initialize_map (void); - bool build_map (void); - - bool insert_instance_into_map ( - const Deployment::InstanceDeploymentDescription & instance); - - bool insert_instance_into_container ( - const Deployment::InstanceDeploymentDescription & instance, - Deployment::ComponentImplementationInfos & impl_infos); + /// shared components list, passed in from NodeImplementationInfoHandler + /// class. + CORBA::StringSeq shared_components_; }; } diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.cpp b/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.cpp index c63290523e5..1d5f60ebd5f 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.cpp +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.cpp @@ -6,10 +6,12 @@ #include "ace/SString.h" CIAO::NodeImplementationInfoHandler:: -NodeImplementationInfoHandler (::Deployment::DeploymentPlan & plan) : +NodeImplementationInfoHandler (::Deployment::DeploymentPlan & plan, + CORBA::StringSeq shared_components) : plan_ (plan), node_info_ (0), - containers_info_map_ (plan) + containers_info_map_ (plan, shared_components), + shared_components_ (shared_components) { ACE_NEW (node_info_, ::Deployment::NodeImplementationInfo); this->populate_server_resource_def (); diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.h b/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.h index 7d4582e0736..de28c9afd74 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.h +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/ImplementationInfo.h @@ -37,7 +37,8 @@ namespace CIAO class CIAO_NAM_Export NodeImplementationInfoHandler { public: - NodeImplementationInfoHandler (::Deployment::DeploymentPlan & plan); + NodeImplementationInfoHandler (::Deployment::DeploymentPlan & plan, + CORBA::StringSeq shared_components); Deployment::NodeImplementationInfo * node_impl_info (void) const; @@ -54,6 +55,9 @@ namespace CIAO /// Helper class that helps populate the container_impl_infos /// field. Containers_Info_Map containers_info_map_; + + /// shared components list, obtained from NodeApplicationManager + CORBA::StringSeq shared_components_; }; } diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp index 8f79af6418d..34adc2a7b4e 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.cpp @@ -11,21 +11,18 @@ #endif /* __ACE_INLINE__ */ -CIAO::NodeApplicationManager_Impl_Base::~NodeApplicationManager_Impl_Base (void) -{ -} - -void +bool CIAO::NodeApplicationManager_Impl_Base:: -parse_config_value (ACE_CString & str - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Deployment::InvalidProperty)) +is_shared_component (ACE_CString & name) { - // The unused arg is for future improvemnts. - ACE_UNUSED_ARG (str); + for (CORBA::ULong i = 0; i < this->shared_components_.length (); ++i) + { + if (ACE_OS::strcmp (this->shared_components_[i].in (), + name.c_str ()) == 0) + return true; + } - ACE_THROW ( CORBA::NO_IMPLEMENT() ); + return false; } Deployment::Connections * @@ -51,21 +48,23 @@ create_connections (ACE_ENV_SINGLE_ARG_DECL) iter != end; ++iter) { + // If this component is in the "shared components list", then we + // should just simply fetch the port object references from the + // NodeManager. + ACE_CString comp_name ((*iter).ext_id_.c_str ()); + // Get all the facets first - if (CIAO::debug_level () > 9) + Components::FacetDescriptions_var facets; + + if (is_shared_component (comp_name)) + facets = const_cast<Components::FacetDescriptions*> + (&(this->node_manager_->get_all_facets (comp_name))); + else { - ACE_DEBUG ((LM_DEBUG, - "DAnCE (%P|%t) NodeApplicationManager_Impl.cpp -" - "CIAO::NodeApplicationManager_Impl::create_connections -" - "getting facets for the component " - "instance [%s] \n", - (*iter).ext_id_.c_str ())); + facets = ((*iter).int_id_)->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER); + this->node_manager_->set_all_facets (comp_name, facets); } - Components::FacetDescriptions_var facets = - ((*iter).int_id_)->get_all_facets (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - if (CIAO::debug_level () > 9) { ACE_DEBUG ((LM_DEBUG, @@ -73,24 +72,22 @@ create_connections (ACE_ENV_SINGLE_ARG_DECL) "CIAO::NodeApplicationManager_Impl::create_connections -" "success getting facets for the component " "instance [%s] \n", - (*iter).ext_id_.c_str ())); + comp_name.c_str ())); } // Get all the event consumers - if (CIAO::debug_level () > 9) + Components::ConsumerDescriptions_var consumers; + + if (is_shared_component (comp_name)) + consumers = const_cast<Components::ConsumerDescriptions*> + (&(this->node_manager_->get_all_consumers (comp_name))); + else { - ACE_DEBUG ((LM_DEBUG, - "DAnCE (%P|%t) NodeApplicationManager_Impl.cpp -" - "CIAO::NodeApplicationManager_Impl::create_connections -" - "getting consumers for the component " - "instance [%s] \n", - (*iter).ext_id_.c_str ())); + consumers = + ((*iter).int_id_)->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); + this->node_manager_->set_all_consumers (comp_name, consumers); } - Components::ConsumerDescriptions_var consumers = - ((*iter).int_id_)->get_all_consumers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - if (CIAO::debug_level () > 9) { ACE_DEBUG ((LM_DEBUG, @@ -98,7 +95,7 @@ create_connections (ACE_ENV_SINGLE_ARG_DECL) "CIAO::NodeApplicationManager_Impl::create_connections -" "success getting consumers for the component " "instance [%s] \n", - (*iter).ext_id_.c_str ())); + comp_name.c_str ())); } const CORBA::ULong facet_len = facets->length (); @@ -171,7 +168,7 @@ startLaunch (const Deployment::Properties & configProperty, * 5. get the provided connection endpoints back and return them. */ - NodeImplementationInfoHandler handler (this->plan_); + NodeImplementationInfoHandler handler (this->plan_, this->shared_components_); Deployment::NodeImplementationInfo * node_info = handler.node_impl_info (); @@ -220,14 +217,14 @@ startLaunch (const Deployment::Properties & configProperty, } } - // This is what we will get back, a sequence of compoent object refs. + // This is what we will get back, a sequence of component object refs. Deployment::ComponentInfos_var comp_info; // This will install all homes and components. comp_info = this->nodeapp_->install (*node_info ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - // Now fill in the map we have for the components. + // Now fill in the map we have for the "newly installed" components. const CORBA::ULong comp_len = comp_info->length (); for (CORBA::ULong len = 0; len < comp_len; @@ -249,6 +246,27 @@ startLaunch (const Deployment::Properties & configProperty, } } + // Also, we need to fill in the map about those "shared components" + // For now, we could use "NIL" component object reference for these + // shared components since they are not used anyway. + CORBA::ULong shared_comp_length = this->shared_components_.length (); + for (CORBA::ULong j = 0; j < shared_comp_length; ++j) + { + if (this->component_map_. + bind (this->shared_components_[j].in (), + Components::CCMObject::_nil ())) + { + ACE_CString error ("Duplicate component instance name "); + error += this->shared_components_[j].in(); + + ACE_TRY_THROW + (Deployment::StartError + ("NodeApplicationManager_Impl::startLaunch", + error.c_str ())); + } + } + + providedReference = this->create_connections (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; @@ -258,7 +276,7 @@ startLaunch (const Deployment::Properties & configProperty, ACE_TRY_THROW (Deployment::StartError ("NodeApplicationManager_Impl::startLaunch", - "Error creating connections during startLaunch.")); + "Error creating connections for components during startLaunch.")); } } ACE_CATCH (Deployment::UnknownImplId, e) @@ -352,7 +370,7 @@ perform_redeployment (const Deployment::Properties & configProperty, } // package the components - NodeImplementationInfoHandler handler (tmp_plan); + NodeImplementationInfoHandler handler (tmp_plan, this->shared_components_); Deployment::NodeImplementationInfo * node_info = handler.node_impl_info (); @@ -499,7 +517,8 @@ CIAO::NodeApplicationManager_Impl::init ( const char *nodeapp_op, const CORBA::ULong delay, const Deployment::DeploymentPlan & plan, - const PortableServer::POA_ptr callback_poa + const PortableServer::POA_ptr callback_poa, + NodeManager_Impl_Base * nm ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty)) @@ -531,6 +550,7 @@ CIAO::NodeApplicationManager_Impl::init ( this->nodeapp_path_.set (nodeapp_location); this->spawn_delay_ = delay; this->nodeapp_command_op_ = CORBA::string_dup (nodeapp_op); + this->node_manager_ = nm; // Make a copy of the plan for later usage. this->plan_ = plan; @@ -724,7 +744,8 @@ CIAO::Static_NodeApplicationManager_Impl::init ( const char *nodeapp_op, const CORBA::ULong delay, const Deployment::DeploymentPlan & plan, - const PortableServer::POA_ptr callback_poa + const PortableServer::POA_ptr callback_poa, + NodeManager_Impl_Base * nm ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty)) @@ -735,6 +756,7 @@ CIAO::Static_NodeApplicationManager_Impl::init ( ACE_UNUSED_ARG (nodeapp_op); ACE_UNUSED_ARG (delay); ACE_UNUSED_ARG (callback_poa); + ACE_UNUSED_ARG (nm); ACE_TRY { diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h index c0f43fc06de..eb5d1057edb 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.h @@ -31,6 +31,7 @@ #include "ciao/CIAO_common.h" #include "CIAO_NAM_Export.h" #include "ImplementationInfo.h" +#include "NodeManager/NodeManager_Impl.h" #include "NodeApplication/NodeApplication_Core.h" namespace CIAO @@ -44,7 +45,7 @@ namespace CIAO public: /// Constructor NodeApplicationManager_Impl_Base (CORBA::ORB_ptr o, - PortableServer::POA_ptr p); + PortableServer::POA_ptr p); /*=========================================================== * Below are operations from the NodeApplicationManager @@ -119,6 +120,8 @@ namespace CIAO * * @param callback_poa contains child poa created for the callback interface. * + * @para nm Pointer to the NodeManager_Impl servant object + * * @return NodeApplicationManager_ptr. **/ virtual PortableServer::ObjectId @@ -126,7 +129,8 @@ namespace CIAO const char *nodeapp_options, const CORBA::ULong delay, const Deployment::DeploymentPlan & plan, - const PortableServer::POA_ptr callback_poa + const PortableServer::POA_ptr callback_poa, + NodeManager_Impl_Base * nm ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty))=0; @@ -138,7 +142,7 @@ namespace CIAO /// Destructor virtual ~NodeApplicationManager_Impl_Base (void); - // Internal help function to create new NodeApplicationProcess + /// Internal help function to create new NodeApplicationProcess virtual Deployment::NodeApplication_ptr create_node_application (const ACE_CString & options ACE_ENV_ARG_DECL_WITH_DEFAULTS) @@ -147,7 +151,7 @@ namespace CIAO Deployment::StartError, Deployment::InvalidProperty))=0; - // Helper function to get the connection. + /// Helper function to get the connection. virtual Deployment::Connections * create_connections (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException, @@ -164,6 +168,10 @@ namespace CIAO ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty)); + /// Helper function to check wheather a component instance + /// is in the "shared components list". + bool is_shared_component (ACE_CString & name); + protected: /// location of the Nodeapplication ACE_CString nodeapp_path_; @@ -174,6 +182,12 @@ namespace CIAO /// Keep a pointer to the managing POA. PortableServer::POA_var poa_; + /// Pointer to the NodeManager_Impl servant object + /// We could do this because NodeManager and NodeApplicationManager + /// are always collocated in the same process, so we don't have + /// to pass CORBA object reference back and forth. + NodeManager_Impl_Base * node_manager_; + /// ObjectRef of ourself which will be needed by the callback Deployment::NodeApplicationManager_var objref_; @@ -211,6 +225,7 @@ namespace CIAO TAO_SYNCH_MUTEX lock_; }; + /** * @class NodeApplicationManager_Impl */ @@ -227,7 +242,8 @@ namespace CIAO const char *nodeapp_options, const CORBA::ULong delay, const Deployment::DeploymentPlan & plan, - const PortableServer::POA_ptr callback_poa + const PortableServer::POA_ptr callback_poa, + NodeManager_Impl_Base * nm ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty)); @@ -247,6 +263,8 @@ namespace CIAO Deployment::InvalidProperty)); }; + + struct Static_Config_EntryPoints_Maps; /** @@ -266,7 +284,8 @@ namespace CIAO const char *nodeapp_options, const CORBA::ULong delay, const Deployment::DeploymentPlan & plan, - const PortableServer::POA_ptr callback_poa + const PortableServer::POA_ptr callback_poa, + NodeManager_Impl_Base * nm ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException, Deployment::InvalidProperty)); diff --git a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.inl b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.inl index 000e8475e3c..e21abfd6bea 100644 --- a/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.inl +++ b/TAO/CIAO/DAnCE/NodeApplicationManager/NodeApplicationManager_Impl.inl @@ -19,6 +19,23 @@ NodeApplicationManager_Impl_Base (CORBA::ORB_ptr o, { } +CIAO::NodeApplicationManager_Impl_Base::~NodeApplicationManager_Impl_Base (void) +{ +} + +void +CIAO::NodeApplicationManager_Impl_Base:: +parse_config_value (ACE_CString & str + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Deployment::InvalidProperty)) +{ + // The unused arg is for future improvemnts. + ACE_UNUSED_ARG (str); + + ACE_THROW ( CORBA::NO_IMPLEMENT() ); +} + ACE_INLINE Deployment::NodeApplicationManager_ptr CIAO::NodeApplicationManager_Impl_Base::get_nodeapp_manager (void) @@ -34,3 +51,4 @@ reset_plan (const ::Deployment::DeploymentPlan & plan { this->plan_ = plan; } + diff --git a/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp b/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp index 9f616385c20..0cb007b85b0 100644 --- a/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.cpp @@ -93,6 +93,41 @@ CIAO::NodeManager_Impl_Base::leaveDomain (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW (CORBA::NO_IMPLEMENT ()); } +const ::Components::FacetDescriptions & +CIAO::NodeManager_Impl_Base:: +get_all_facets (ACE_CString & name) +{ + Component_Facets_Map::ENTRY *entry; + this->comp_facets_map_.find (name.c_str (), entry); + + return entry->int_id_.in (); +} + +const ::Components::ConsumerDescriptions & +CIAO::NodeManager_Impl_Base:: +get_all_consumers (ACE_CString & name) +{ + Component_Consumers_Map::ENTRY *entry; + this->comp_consumers_map_.find (name.c_str (), entry); + + return entry->int_id_.in (); +} + +void +CIAO::NodeManager_Impl_Base:: +set_all_facets (ACE_CString &name, + const ::Components::FacetDescriptions_var & facets) +{ + this->comp_facets_map_.bind (name, facets); +} + +void +CIAO::NodeManager_Impl_Base:: +set_all_consumers (ACE_CString &name, + const ::Components::ConsumerDescriptions_var & consumers) +{ + this->comp_consumers_map_.bind (name, consumers); +} Deployment::NodeApplicationManager_ptr CIAO::NodeManager_Impl_Base::preparePlan (const Deployment::DeploymentPlan &plan @@ -146,24 +181,25 @@ CIAO::NodeManager_Impl_Base::preparePlan (const Deployment::DeploymentPlan &plan } //Implementation undefined. - CIAO::NodeApplicationManager_Impl_Base *app_mgr; - app_mgr = + CIAO::NodeApplicationManager_Impl_Base *node_app_mgr; + node_app_mgr = this->create_node_app_manager (this->orb_.in (), this->poa_.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - PortableServer::ServantBase_var safe (app_mgr); + PortableServer::ServantBase_var safe (node_app_mgr); //@@ Note: after the init call the servant ref count would // become 2. so we can leave the safeservant along and be // dead. Also note that I added PortableServer::ObjectId_var oid = - app_mgr->init (this->nodeapp_location_.in (), - this->nodeapp_options_.in (), - this->spawn_delay_, - plan, - this->callback_poa_.in () - ACE_ENV_ARG_PARAMETER); + node_app_mgr->init (this->nodeapp_location_.in (), + this->nodeapp_options_.in (), + this->spawn_delay_, + plan, + this->callback_poa_.in (), + this // pass in a copy of ourself (servant object) + ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; this->map_.insert_nam (plan.UUID.in (), oid.in ()); diff --git a/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.h b/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.h index 53a19ada96c..2dc4b11ebac 100644 --- a/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.h +++ b/TAO/CIAO/DAnCE/NodeManager/NodeManager_Impl.h @@ -95,6 +95,23 @@ namespace CIAO Deployment::StopError, Deployment::InvalidReference)); + // ********* CIAO Specific Helper functions ************ + + virtual const ::Components::FacetDescriptions & + get_all_facets (ACE_CString & name); + + virtual const ::Components::ConsumerDescriptions & + get_all_consumers (ACE_CString & name); + + virtual void + set_all_facets (ACE_CString &name, + const ::Components::FacetDescriptions_var & facets); + + virtual void + set_all_consumers (ACE_CString &name, + const ::Components::ConsumerDescriptions_var & consumers); + + private: /// Validate the child deployment plan. In particular, we are /// trying to verify that all the component instances within this @@ -148,13 +165,33 @@ namespace CIAO ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> Reference_Count_Map; - typedef Reference_Count_Map::iterator Ref_Count_Iterator; Reference_Count_Map ref_count_map_; /// A list to track the names of shared component instances CORBA::StringSeq shared_components_; + + /// Cached object references of ports (facets/consumers) of + /// all components. This is useful for getting the port object + /// references of "shared components". + typedef + ACE_Hash_Map_Manager_Ex <ACE_CString, + Components::FacetDescriptions_var, + ACE_Hash<ACE_CString>, + ACE_Equal_To<ACE_CString>, + ACE_Null_Mutex> Component_Facets_Map; + + Component_Facets_Map comp_facets_map_; + + typedef + ACE_Hash_Map_Manager_Ex <ACE_CString, + Components::ConsumerDescriptions_var, + ACE_Hash<ACE_CString>, + ACE_Equal_To<ACE_CString>, + ACE_Null_Mutex> Component_Consumers_Map; + + Component_Consumers_Map comp_consumers_map_; }; diff --git a/TAO/CIAO/DAnCE/NodeManager/Node_Manager.cpp b/TAO/CIAO/DAnCE/NodeManager/Node_Manager.cpp index 13bcf6e45a2..65da583ad45 100644 --- a/TAO/CIAO/DAnCE/NodeManager/Node_Manager.cpp +++ b/TAO/CIAO/DAnCE/NodeManager/Node_Manager.cpp @@ -172,10 +172,9 @@ main (int argc, char *argv[]) if (CORBA::is_nil (adapter.in ())) ACE_ERROR_RETURN ((LM_ERROR, "Nil IORTable\n"), -1); - - // Create and install the CIAO Daemon servant - CIAO::NodeManager_Impl *daemon_servant = 0; - ACE_NEW_RETURN (daemon_servant, + // Create and install the CIAO NodeManager servant + CIAO::NodeManager_Impl *node_manager_servant = 0; + ACE_NEW_RETURN (node_manager_servant, CIAO::NodeManager_Impl("NodeManager", orb.in (), poa.in (), @@ -183,16 +182,16 @@ main (int argc, char *argv[]) nodeapp_options_, spawn_delay), -1); - PortableServer::ServantBase_var safe_daemon (daemon_servant); + PortableServer::ServantBase_var safe_daemon (node_manager_servant); - daemon_servant->init (); + node_manager_servant->init (); // Implicit activation - CIAO::NodeManager_var daemon = - daemon_servant->_this (); + CIAO::NodeManager_var node_manager = + node_manager_servant->_this (); CORBA::String_var str = - orb->object_to_string (daemon.in () + orb->object_to_string (node_manager.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -216,7 +215,7 @@ main (int argc, char *argv[]) // Register this name with the Naming Service (void) register_with_ns (name, orb.in (), - daemon.in () + node_manager.in () ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } @@ -231,7 +230,7 @@ main (int argc, char *argv[]) mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - // End Deployment part + // Finishing Deployment part ACE_DEBUG ((LM_DEBUG, "CIAO_NodeManager is running...\n")); diff --git a/TAO/CIAO/examples/Hello/descriptors/TestNodeManagerMap.dat b/TAO/CIAO/examples/Hello/descriptors/TestNodeManagerMap.dat deleted file mode 100644 index d3e2c75a243..00000000000 --- a/TAO/CIAO/examples/Hello/descriptors/TestNodeManagerMap.dat +++ /dev/null @@ -1,3 +0,0 @@ -SenderNode corbaloc:iiop:localhost:60001/NodeManager -ReceiverNode corbaloc:iiop:localhost:60002/NodeManager - diff --git a/TAO/CIAO/examples/Hello/descriptors/run_test_without_ns.pl b/TAO/CIAO/examples/Hello/descriptors/run_test_without_ns.pl deleted file mode 100755 index 1649cb0595f..00000000000 --- a/TAO/CIAO/examples/Hello/descriptors/run_test_without_ns.pl +++ /dev/null @@ -1,158 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; -$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; -$DAnCE = "$ENV{'ACE_ROOT'}/TAO/CIAO/DAnCE"; - -$daemons_running = 0; -$em_running = 0; -$daemons = 2; -@ports = ( 60001, 60002 ); -@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior" ); -$status = 0; -$dat_file = "TestNodeManagerMap.dat"; -$cdp_file = "DeploymentPlan.cdp"; -$controller_exec = "$CIAO_ROOT/examples/Hello/Sender/starter"; - -$E = 0; -$EM = 0; - -# Delete if there are any .ior files. -sub delete_ior_files { - for ($i = 0; $i < $daemons; ++$i) { - unlink $iorfiles[$i]; - } - unlink PerlACE::LocalFile ("EM.ior"); - unlink PerlACE::LocalFile ("Receiver.ior"); - unlink PerlACE::LocalFile ("Sender.ior"); - unlink PerlACE::LocalFile ("DAM.ior"); -} - -sub kill_node_daemons { - for ($i = 0; $i < $daemons; ++$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } -} - -sub kill_open_processes { - if ($daemons_running == 1) { - kill_node_daemons (); - } - - if ($em_running == 1) { - $EM->Kill (); - $EM->TimedWait (1); - } -} - -sub run_node_daemons { - for ($i = 0; $i < $daemons; ++$i) - { - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - - $iiop = "iiop://localhost:$port"; - $node_app = "$DAnCE/NodeApplication/NodeApplication"; - - $d_cmd = "$DAnCE/NodeManager/NodeManager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -o $iorfile"; - - $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); - $result = $Daemons[$i]->Spawn (); - push(@processes, $Daemons[$i]); - - if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR - "ERROR: The ior file of node daemon $i could not be found\n"; - for (; $i > 0; --$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } - return -1; - } - } - $daemons_running = 1; - return 0; -} - -delete_ior_files (); - -# Invoke node daemons. -print "Invoking node daemons\n"; -$status = run_node_daemons (); - -if ($status != 0) { - print STDERR "ERROR: Unable to execute the node daemons\n"; - exit 1; -} - -$ns_running = 1; - -# Invoke execution manager. -print "Invoking execution manager\n"; -$EM = new PerlACE::Process ("$DAnCE/ExecutionManager/Execution_Manager", - "-o EM.ior -i $dat_file"); -$EM->Spawn (); - -if (PerlACE::waitforfile_timed ("EM.ior", - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR - "ERROR: The ior file of execution manager could not be found\n"; - kill_open_processes (); - exit 1; -} - -$em_running = 1; - -# Invoke executor - start the application -. -print "Invoking executor - start the application -\n"; -$E = - new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher", - "-p flattened_deploymentplan_without_ns.cdp -k file://EM.ior -o DAM.ior"); - -$E->SpawnWaitKill (5000); - -if (PerlACE::waitforfile_timed ( - "Receiver.ior", - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: The ior file of receiver could not be found\n"; - kill_open_processes (); - exit 1; -} - -if (PerlACE::waitforfile_timed ("Sender.ior", - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: The ior file of sender could not be found\n"; - kill_open_processes (); - exit 1; -} - -print "Invoking the controller\n"; -$controller = new PerlACE::Process ("$controller_exec", "-k file://Sender.ior"); -$result = $controller->SpawnWaitKill (3000); - -if ($result != 0) { - print STDERR "ERROR: The controller returned $result\n"; - $status = 1; -} - -# Invoke executor - stop the application -. -print "Invoking executor - stop the application -\n"; -$E = - new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher", - "-k file://EM.ior -i file://DAM.ior"); -$E->SpawnWaitKill (3000); - -print "Executor returned.\n"; -print "Shutting down rest of the processes.\n"; - -delete_ior_files (); -kill_open_processes (); - -exit $status; diff --git a/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan.cdp b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan.cdp new file mode 100644 index 00000000000..8b42fa056ef --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan.cdp @@ -0,0 +1,222 @@ +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0001</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false</provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd"> + <name>Hello-Sender-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + <instance id="Hello-Receiver-idd"> + <name>Hello-Receiver-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hello_event_connection</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <connection> + <name>hello_facet_connection</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> diff --git a/TAO/CIAO/examples/Hello/descriptors/flattened_deploymentplan_without_ns_add.cdp b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan_add.cdp index 3cd860509a6..3cd860509a6 100644 --- a/TAO/CIAO/examples/Hello/descriptors/flattened_deploymentplan_without_ns_add.cdp +++ b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan_add.cdp diff --git a/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan_remove.cdp b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan_remove.cdp new file mode 100644 index 00000000000..6a34f62e7b0 --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_ReDaC/deploymentplan_remove.cdp @@ -0,0 +1,223 @@ +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0001</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false</provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd"> + <name>Hello-Sender-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + + <instance id="Hello-Receiver-idd-UPDATE-XXXXXXXX"> + <name>Hello-Receiver-idd-UPDATE-XXXXXXXXX</name> + <node>ReceiverNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver_2.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hello_event_connection_new</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd-UPDATE-XXXXXXXX</instance> + </internalEndpoint> + </connection> + + <connection> + <name>hello_facet_connection_new</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd-UPDATE-XXXXXXXX</instance> + </internalEndpoint> + </connection> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> diff --git a/TAO/CIAO/examples/Hello/descriptors_naming/deploymentplan_naming.cdp b/TAO/CIAO/examples/Hello/descriptors_naming/deploymentplan_naming.cdp new file mode 100644 index 00000000000..7192a2bc061 --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_naming/deploymentplan_naming.cdp @@ -0,0 +1,240 @@ +<!-- This flattened deployment plan allows component instance to + register to naming service, if you don't want to use naming + service at all, you can use the flattened_deployment_without_ns.cdp + as your deployment descriptor. --> + +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0001</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false></provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd"> + <name>Hello-Sender-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to register with naming service --> + <!-- The string is the naming context to bind to naming service --> + <configProperty> + <name>RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender_001</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + <instance id="Hello-Receiver-idd"> + <name>Hello-Receiver-idd</name> + <node>ReceiverNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hell_event_connection</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <connection> + <name>hello_facet_connection</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> diff --git a/TAO/CIAO/examples/Hello/descriptors/RTsvc.conf b/TAO/CIAO/examples/Hello/descriptors_real_time/RTsvc.conf index 1bfd9e8eaba..1bfd9e8eaba 100644 --- a/TAO/CIAO/examples/Hello/descriptors/RTsvc.conf +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/RTsvc.conf diff --git a/TAO/CIAO/examples/Hello/descriptors_real_time/input.csr b/TAO/CIAO/examples/Hello/descriptors_real_time/input.csr new file mode 100644 index 00000000000..a3881225930 --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/input.csr @@ -0,0 +1,70 @@ + +<CIAO:ServerResources + xmlns:CIAO="http://www.dre.vanderbilt.edu/ServerResources" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.dre.vanderbilt.edu/ServerResources CIAOServerResources.xsd"> + + <cmdline> + <arg> -ORBDebugLevel 10 -ORBEndpoint corbaloc://foo/bar</arg> + </cmdline> + + <svcconf> + <uri> + svcconf.uri + </uri> + </svcconf> + + <orbConfigs> + <resources> + <threadpool id="threadpool-1"> + <stacksize>100</stacksize> + <static_threads>50</static_threads> + <dynamic_threads>25</dynamic_threads> + <default_priority>5</default_priority> + <allow_request_buffering>true</allow_request_buffering> + <max_buffered_requests>10</max_buffered_requests> + <max_request_buffered_size>20</max_request_buffered_size> + </threadpool> + + <threadpoolWithLanes id="threadpool-2"> + <threadpoolLane> + <static_threads>50</static_threads> + <dynamic_threads>25</dynamic_threads> + <priority>36</priority> + </threadpoolLane> + <stacksize>100</stacksize> + <allow_borrowing>true</allow_borrowing> + <allow_request_buffering>true</allow_request_buffering> + <max_buffered_requests>10</max_buffered_requests> + <max_request_buffered_size>20</max_request_buffered_size> + </threadpoolWithLanes> + + <connectionBands id="cb-1"> + <band> + <low>0</low> + <high>10</high> + </band> + <band> + <low>11</low> + <high>20</high> + </band> + </connectionBands> + </resources> + + <policySet id="test_policy_set_id"> + <priorityModel server_priority="10"> + <priority_model>SERVER_DECLARED</priority_model> + </priorityModel> + <priorityModel> + <priority_model>CLIENT_PROPAGATED</priority_model> + </priorityModel> + + <threadpool>threadpool-1</threadpool> + <threadpool>threadpool-2</threadpool> + + <priorityBandedConnection>cb-1</priorityBandedConnection> + + </policySet> + </orbConfigs> +</CIAO:ServerResources>
\ No newline at end of file diff --git a/TAO/CIAO/examples/Hello/descriptors/rt-config-example.cdp b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-config-example.cdp index 72e1694b1c3..72e1694b1c3 100644 --- a/TAO/CIAO/examples/Hello/descriptors/rt-config-example.cdp +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-config-example.cdp diff --git a/TAO/CIAO/examples/Hello/descriptors/rt-config-example.csr b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-config-example.csr index 9c63f545984..9c63f545984 100644 --- a/TAO/CIAO/examples/Hello/descriptors/rt-config-example.csr +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-config-example.csr diff --git a/TAO/CIAO/examples/Hello/descriptors/rt-example.cdp b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-example.cdp index 10317dbe33e..10317dbe33e 100644 --- a/TAO/CIAO/examples/Hello/descriptors/rt-example.cdp +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/rt-example.cdp diff --git a/TAO/CIAO/examples/Hello/descriptors/rt_run_test.pl b/TAO/CIAO/examples/Hello/descriptors_real_time/rt_run_test.pl index 3a94c8b99e9..3a94c8b99e9 100644 --- a/TAO/CIAO/examples/Hello/descriptors/rt_run_test.pl +++ b/TAO/CIAO/examples/Hello/descriptors_real_time/rt_run_test.pl diff --git a/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan.cdp b/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan.cdp new file mode 100644 index 00000000000..8b42fa056ef --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan.cdp @@ -0,0 +1,222 @@ +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0001</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false</provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd"> + <name>Hello-Sender-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + <instance id="Hello-Receiver-idd"> + <name>Hello-Receiver-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hello_event_connection</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <connection> + <name>hello_facet_connection</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> diff --git a/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan_shared_components.cdp b/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan_shared_components.cdp new file mode 100644 index 00000000000..19922142f8a --- /dev/null +++ b/TAO/CIAO/examples/Hello/descriptors_shared_components/deploymentplan_shared_components.cdp @@ -0,0 +1,229 @@ +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0002</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false</provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd-new-component"> + <name>Hello-Sender-idd-new-component</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender_new_component.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + <instance id="Hello-Receiver-idd"> + <name>Hello-Receiver-idd</name> + <node>SenderNode</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <!-- **************************************** + This IOR file should NOT be generated. + DAnCE should NOT create this component instance + because it is a "shared" component + **************************************** --> + <string>Receiver_new_component.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hello_event_connection</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd-new-component</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + +<!-- + <connection> + <name>hello_facet_connection</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd-new-component</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> +--> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> |