Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CIAO::DomainApplicationManager_Impl Class Reference

A servant for the Deployment::DomainApplicationManager interface. The DomainApplicationManager is responsible for deploying an application on the domain level, i.e. across nodes. It specializes the ApplicationManager abstract interface. More...

#include <DomainApplicationManager_Impl.h>

Collaboration diagram for CIAO::DomainApplicationManager_Impl:

Collaboration graph
List of all members.

Public Types

typedef CIAO::DomainApplicationManager_Impl::_chained_artifacts Chained_Artifacts

Public Member Functions

 DomainApplicationManager_Impl (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, Deployment::TargetManager_ptr manager, const Deployment::DeploymentPlan &plan, const char *deployment_file) throw (CORBA::SystemException)
void init (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Deployment::ResourceNotAvailable, Deployment::StartError, Deployment::PlanError)
void set_uuid (const char *uuid)
const char * get_uuid () const
virtual void startLaunch (const ::Deployment::Properties &configProperty,::CORBA::Boolean start ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, ::Deployment::ResourceNotAvailable, ::Deployment::StartError, ::Deployment::InvalidProperty)
virtual void finishLaunch (::CORBA::Boolean start ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, ::Deployment::StartError)
virtual void start (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, ::Deployment::StartError)
virtual void destroyApplication (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, ::Deployment::StopError)
virtual ::Deployment::DeploymentPlan * getPlan (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException)
virtual void destroyManager (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Deployment::StopError)
virtual void perform_redeployment (const Deployment::DeploymentPlan &plan ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, Deployment::PlanError, Deployment::InstallationFailure, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InvalidConnection, ::Components::RemoveFailure)

Protected Types

typedef ACE_Hash_Map_Manager_Ex<
ACE_CString, Chained_Artifacts,
ACE_Hash< ACE_CString >,
ACE_Equal_To< ACE_CString >,

Protected Member Functions

virtual ~DomainApplicationManager_Impl (void)
bool get_plan_info (void)
int split_plan (void)
void add_connections (const Deployment::Connections &incoming_conn)
Deployment::Connections * get_outgoing_connections (const Deployment::DeploymentPlan &plan ACE_ENV_ARG_DECL)
bool get_outgoing_connections_i (const char *instname, Deployment::Connections &retv ACE_ENV_ARG_DECL) throw (Deployment::StartError)
 This is a helper function to find the connection for a component.
void dump_connections (const ::Deployment::Connections &connections)
 Dump connections, a static method.

Protected Attributes

CORBA::String_var domainapp_path_
 location of the Domainapplication
CORBA::ORB_var orb_
 Keep a pointer to the managing ORB serving this servant.
PortableServer::POA_var poa_
 Keep a pointer to the managing POA.
CORBA::String_var ior_
 Cache the ior of the previous reference.
Deployment::TargetManager_var target_manager_
 Cached TargetManager.
Deployment::DeploymentPlan plan_
size_t num_child_plans_
 Total number of child deployment plans.
ACE_Vector< ACE_CStringnode_manager_names_
Chained_Artifacts_Table artifact_map_
const char * deployment_file_
 The deployment information data file.
Deployment_Configuration deployment_config_
 Deployment Configuration info, which contains the deployment topology.
CORBA::String_var uuid_
 UUID from the Plan.
::Deployment::Connections_var all_connections_
bool is_redeployment

Detailed Description

A servant for the Deployment::DomainApplicationManager interface. The DomainApplicationManager is responsible for deploying an application on the domain level, i.e. across nodes. It specializes the ApplicationManager abstract interface.

Member Typedef Documentation

typedef struct CIAO::DomainApplicationManager_Impl::_chained_artifacts CIAO::DomainApplicationManager_Impl::Chained_Artifacts

Define the type which contains a list of DnC artifacts. @ Assumption: Each NodeApplicationManager create only one NodeApplication when the startLaunch() operation is invoked, which means all the nodes on that child plan are collocated in the same process.

typedef ACE_Hash_Map_Manager_Ex<ACE_CString, Chained_Artifacts, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> CIAO::DomainApplicationManager_Impl::Chained_Artifacts_Table [protected]

Cached information for NodeManager, NodeApplicationManager, NodeApplication, Connections, etc. Key: NodeManager name with CString type. Value: Chained_Artifacts struct type.

Constructor & Destructor Documentation

CIAO::DomainApplicationManager_Impl::DomainApplicationManager_Impl CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
Deployment::TargetManager_ptr  manager,
const Deployment::DeploymentPlan &  plan,
const char *  deployment_file
throw (CORBA::SystemException)


CIAO::DomainApplicationManager_Impl::~DomainApplicationManager_Impl void   )  [protected, virtual]


Member Function Documentation

void CIAO::DomainApplicationManager_Impl::add_connections const Deployment::Connections &  incoming_conn  )  [protected]

Cache the incoming connections, which is a sequence of Connections, into the <all_connections_> list.

void CIAO::DomainApplicationManager_Impl::destroyApplication ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, ::Deployment::StopError) [virtual]

Terminates a running application. Raises the StopError exception if an error occurs during termination. Raises the InvalidReference exception if the appliction referen is unknown.

void CIAO::DomainApplicationManager_Impl::destroyManager ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, Deployment::StopError) [virtual]

This is a helper function to destroy the NodeAppManager. Since we don't want to do so in the destructor so we will ask the ExecutionManager to do this on us when the same IDL op invoked on it. This is part of the result for merging DAM with DA.

void CIAO::DomainApplicationManager_Impl::dump_connections const ::Deployment::Connections &  connections  )  [protected]

Dump connections, a static method.

void CIAO::DomainApplicationManager_Impl::finishLaunch ::CORBA::Boolean start  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, ::Deployment::StartError) [virtual]

The second step in launching an application in the domain-level. If the start parameter is true, the application is started as well. Raises the StartError exception if launching or starting the application fails.

Deployment::Connections * CIAO::DomainApplicationManager_Impl::get_outgoing_connections const Deployment::DeploymentPlan &plan  ACE_ENV_ARG_DECL  )  [protected]

Given a child deployment plan, find the <connections> sequence of the "providedReference" for the component instances in the child deployment plan as Receiver side.

bool CIAO::DomainApplicationManager_Impl::get_outgoing_connections_i const char *  instname,
Deployment::Connections &retv  ACE_ENV_ARG_DECL
throw (Deployment::StartError) [protected]

This is a helper function to find the connection for a component.

bool CIAO::DomainApplicationManager_Impl::get_plan_info void   )  [protected]

(1) Parse the global deployment plan, get the total number of child plans included in the global plan, and get the list of names of NodeManagers for each child plan. (2) Check whether all the NodeManager names are present in the deployment information data file.

ACE_INLINE const char * CIAO::DomainApplicationManager_Impl::get_uuid  )  const

Deployment::DeploymentPlan * CIAO::DomainApplicationManager_Impl::getPlan ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException)

Returns the DeploymentPlan associated with this ApplicationManager.

void CIAO::DomainApplicationManager_Impl::init ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, Deployment::ResourceNotAvailable, Deployment::StartError, Deployment::PlanError)

Initialize the DomainApplicationManager. (1) Set the total number of child plans. (2) Set the list of NodeManager names, which is an array of strings. The <node_manager_names> is a pointer to an array of ACE_CString objets, which is allocated by the caller and deallocated by the DomainApplicationManager destructor. (3) Check the validity of the deployment plan and the deployment information data file. (4) Call split_plan () member function. (5) Invoke all the preparePlan () operations on all the corresponding NodeManagers with child plans.

@ What else do we need to initialize here?

void CIAO::DomainApplicationManager_Impl::perform_redeployment const Deployment::DeploymentPlan &plan  ACE_ENV_ARG_DECL_WITH_DEFAULTS  )  throw (CORBA::SystemException, Deployment::PlanError, Deployment::InstallationFailure, Deployment::UnknownImplId, Deployment::ImplEntryPointNotFound, Deployment::InvalidConnection, ::Components::RemoveFailure) [virtual]

ACE_INLINE void CIAO::DomainApplicationManager_Impl::set_uuid const char *  uuid  ) 

set_uuid method on the DomainApplicationManager assigns the UUID of the associated plan to this Manager. This helps in reverse lookup operations such as given a manager, obtaining the UUID associated. The get_uuid method is used in this case.

int CIAO::DomainApplicationManager_Impl::split_plan void   )  [protected]

Split the global (domain-level) deployment plan to a set of local (node-level) deployment plans. The set of local plans are cached in the ACE hash map member variable. Also, fill in the <node_manager_> field of the Chained_Artifacts struct.

void CIAO::DomainApplicationManager_Impl::start ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS   )  throw (CORBA::SystemException, ::Deployment::StartError) [virtual]

Starts the application. Raises the StartError exception if starting the application fails.

void CIAO::DomainApplicationManager_Impl::startLaunch const ::Deployment::Properties &  configProperty,
throw (CORBA::SystemException, ::Deployment::ResourceNotAvailable, ::Deployment::StartError, ::Deployment::InvalidProperty) [virtual]

Executes the application, but does not start it yet. Users can optionally provide launch-time configuration properties to override properties that are part of the plan. Raises the InvalidProperty exception if a configuration property is invalid. Raises the StartError exception if an error occurs during launching. Raises the ResourceNotAvailable exception if the commitResources parameter to the prepare operation of the ExecutionManager was true, if late resource allocation is used, and one of the requested resources is not available.

Member Data Documentation

::Deployment::Connections_var CIAO::DomainApplicationManager_Impl::all_connections_ [protected]

Maintain a list of <connections>, each of which is obtained by calling the startLaunch() method on the NodeApplicationManager object.

Chained_Artifacts_Table CIAO::DomainApplicationManager_Impl::artifact_map_ [protected]

Deployment_Configuration CIAO::DomainApplicationManager_Impl::deployment_config_ [protected]

Deployment Configuration info, which contains the deployment topology.

const char* CIAO::DomainApplicationManager_Impl::deployment_file_ [protected]

The deployment information data file.

CORBA::String_var CIAO::DomainApplicationManager_Impl::domainapp_path_ [protected]

location of the Domainapplication

CORBA::String_var CIAO::DomainApplicationManager_Impl::ior_ [protected]

Cache the ior of the previous reference.

Cache a object reference to this servant. Deployment::DomainApplicationManager_var objref_;

bool CIAO::DomainApplicationManager_Impl::is_redeployment [protected]

This variable is used to control the execution path of some member function implementations. The reason is because we want to avoid unnecessary code duplicate. The default value is "false".

ACE_Vector<ACE_CString> CIAO::DomainApplicationManager_Impl::node_manager_names_ [protected]

The list of node manager names, each of them corresponds to one child plan.

size_t CIAO::DomainApplicationManager_Impl::num_child_plans_ [protected]

Total number of child deployment plans.

CORBA::ORB_var CIAO::DomainApplicationManager_Impl::orb_ [protected]

Keep a pointer to the managing ORB serving this servant.

Deployment::DeploymentPlan CIAO::DomainApplicationManager_Impl::plan_ [protected]

Cached deployment plan for the particular domain. The plan will be initialized when init is called.

PortableServer::POA_var CIAO::DomainApplicationManager_Impl::poa_ [protected]

Keep a pointer to the managing POA.

Deployment::TargetManager_var CIAO::DomainApplicationManager_Impl::target_manager_ [protected]

Cached TargetManager.

CORBA::String_var CIAO::DomainApplicationManager_Impl::uuid_ [protected]

UUID from the Plan.

The documentation for this class was generated from the following files:
Generated on Wed Dec 21 00:01:01 2005 for DAnCE by  doxygen