summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp')
-rw-r--r--CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp156
1 files changed, 62 insertions, 94 deletions
diff --git a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
index 85f7ebd005d..8a93b2f5ef0 100644
--- a/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
+++ b/CIAO/DAnCE/ExecutionManager/Execution_Manager_Impl.cpp
@@ -29,8 +29,7 @@ namespace CIAO
Deployment::DomainApplicationManager_ptr
Execution_Manager_Impl::preparePlan (
const Deployment::DeploymentPlan &plan,
- CORBA::Boolean
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::ResourceNotAvailable,
Deployment::PlanError,
@@ -90,7 +89,6 @@ namespace CIAO
// our disposal already in this function.
// Why did the creation of DAM fail in the first place?
//
- ACE_CHECK_RETURN (::Deployment::DomainApplicationManager::_nil ());
// Standard owner transfer mechanisms.
//
@@ -102,14 +100,13 @@ namespace CIAO
// Node Application Managers.
//
ACE_DEBUG ((LM_DEBUG, "CIAO (%P|%t) About to init...\n"));
- dam_servant->init (ACE_ENV_SINGLE_ARG_PARAMETER);
+ dam_servant->init ();
// This is a wrong exception to be thrown here.
// We already had a DAM servant, the DAM servant is
// not NIL any more.
// We need to throw the right exception here.
//
- ACE_CHECK_RETURN (::Deployment::DomainApplicationManager::_nil ());
ACE_DEBUG ((LM_DEBUG, "CIAO (%P|%t) About to set uuid on DAM...\n"));
dam_servant->set_uuid (plan.UUID.in ());
@@ -129,19 +126,18 @@ namespace CIAO
}
Deployment::DomainApplicationManagers *
- Execution_Manager_Impl::getManagers (ACE_ENV_SINGLE_ARG_DECL)
+ Execution_Manager_Impl::getManagers ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
CIAO_TRACE("Execution_Manager::Execution_Manager_Impl::getManagers");
// TODO Need to check the return value.
//
- return this->map_.get_dams (ACE_ENV_SINGLE_ARG_PARAMETER);
+ return this->map_.get_dams ();
}
Deployment::DomainApplicationManager_ptr
- Execution_Manager_Impl::getManager (const char * plan_uuid
- ACE_ENV_ARG_DECL)
+ Execution_Manager_Impl::getManager (const char * plan_uuid)
ACE_THROW_SPEC ((CORBA::SystemException, Deployment::PlanNotExist))
{
return this->map_.fetch_dam_reference (plan_uuid);
@@ -149,17 +145,15 @@ namespace CIAO
void
Execution_Manager_Impl::destroyManager (
- Deployment::DomainApplicationManager_ptr manager
- ACE_ENV_ARG_DECL)
+ Deployment::DomainApplicationManager_ptr manager)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StopError))
{
CIAO_TRACE("Execution_Manager::Execution_Manager_Impl::destroyManagers");
- ACE_TRY
+ try
{
::Deployment::DeploymentPlan_var plan =
- manager->getPlan (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager->getPlan ();
// What if we still have components running within this plan?
//
@@ -167,40 +161,32 @@ namespace CIAO
// Where does the POA deactivate happen?
//
- manager->destroyManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager->destroyManager ();
#if 0
PortableServer::ObjectId_var oid =
- this->poa_->reference_to_id (manager
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->poa_->reference_to_id (manager);
- this->poa_->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->poa_->deactivate_object (oid.in ());
#endif /*if 0*/
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::destroyManager\t\n");
- ACE_THROW (Deployment::StopError ());
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::destroyManager\t\n");
+ throw Deployment::StopError ();
}
- ACE_ENDTRY;
- ACE_CHECK;
}
void
Execution_Manager_Impl::destroyManagerByPlan (
- const char * plan_uuid
- ACE_ENV_ARG_DECL)
+ const char * plan_uuid)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StopError))
{
CIAO_TRACE("Execution_Manager::Execution_Manager_Impl::destroyManagerByPlan");
- ACE_TRY
+ try
{
// Get DomainApplicationManager first
if (! this->map_.is_plan_available (plan_uuid))
@@ -208,7 +194,7 @@ namespace CIAO
ACE_ERROR ((LM_ERROR,
"Execution_Manager_Impl::destroyManagerByPlan - "
"Invalid plan uuid [%s]\n", plan_uuid));
- ACE_THROW (Deployment::StopError ());
+ throw Deployment::StopError ();
}
Deployment::DomainApplicationManager_var
@@ -230,45 +216,36 @@ namespace CIAO
// Where does the POA deactivate happen?
//
- dam->destroyManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ dam->destroyManager ();
#if 0
PortableServer::ObjectId_var oid =
- this->poa_->reference_to_id (manager
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->poa_->reference_to_id (manager);
- this->poa_->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->poa_->deactivate_object (oid.in ());
#endif /*if 0*/
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::destroyManager\t\n");
- ACE_THROW (Deployment::StopError ());
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::destroyManager\t\n");
+ throw Deployment::StopError ();
}
- ACE_ENDTRY;
- ACE_CHECK;
}
void
- Execution_Manager_Impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ Execution_Manager_Impl::shutdown ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
CIAO_TRACE("Execution_Manager::Execution_Manager_Impl::shutdown");
// Shutdown the ORB on which it is runing
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->shutdown (0);
}
void
Execution_Manager_Impl::perform_redeployment (
- const Deployment::DeploymentPlan & plan
- ACE_ENV_ARG_DECL)
+ const Deployment::DeploymentPlan & plan)
ACE_THROW_SPEC ((::CORBA::SystemException,
::Deployment::PlanError,
::Deployment::InstallationFailure,
@@ -296,30 +273,27 @@ namespace CIAO
"DAnCE (%P|%t) ExecutionManager_Impl.cpp -"
"CIAO::Execution_Manager_Impl::perform_redeployment -"
"Invalid plan uuid: %s\n", plan.UUID.in ()));
- ACE_THROW (Deployment::PlanError (
- "Execution_Manager_Impl::perform_redeployment",
- "Invalid plan uuid specified."));
+ throw Deployment::PlanError (
+ "Execution_Manager_Impl::perform_redeployment",
+ "Invalid plan uuid specified.");
}
- ACE_TRY
+ try
{
// Call perform_redeployment() on the DAM, which will do the
// actual redeployment and reconfiguration on the dommain level.
dam->perform_redeployment (plan);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::perform_redeployment\t\n");
- ACE_RE_THROW;
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::perform_redeployment\t\n");
+ throw;
}
- ACE_ENDTRY;
- ACE_CHECK;
}
Deployment::DeploymentPlan *
- Execution_Manager_Impl::getPlan (const char * plan_uuid
- ACE_ENV_ARG_DECL)
+ Execution_Manager_Impl::getPlan (const char * plan_uuid)
ACE_THROW_SPEC ((::CORBA::SystemException))
{
Deployment::DomainApplicationManager_var dam;
@@ -334,21 +308,18 @@ namespace CIAO
"DAnCE (%P|%t) ExecutionManager_Impl.cpp -"
"CIAO::Execution_Manager_Impl::getPlan -"
"Invalid plan uuid: %s\n", plan_uuid));
- ACE_THROW (::CORBA::BAD_PARAM ());
+ throw ::CORBA::BAD_PARAM ();
}
- ACE_TRY
+ try
{
return dam->getPlan ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::getPlan\t\n");
- ACE_RE_THROW;
+ ex._tao_print_exception ("Execution_Manager_Impl::getPlan\t\n");
+ throw;
}
- ACE_ENDTRY;
- ACE_CHECK;
}
void
@@ -364,7 +335,7 @@ namespace CIAO
// Find the NodeApplication hosting the component, and then call
// <finishLaunch> on it
- ACE_TRY
+ try
{
Deployment::NodeApplication_var
node_app = this->find_node_application (binding);
@@ -374,7 +345,7 @@ namespace CIAO
ACE_ERROR ((LM_ERROR,
"Execution_Manager_Impl::finalize_global_binding - "
"nil NodeApplication object reference.\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
node_app->finishLaunch (binding.providedReference_.in (),
@@ -387,13 +358,12 @@ namespace CIAO
else
this->remove_shared_component (binding);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::finalize_global_binding\t\n");
- ACE_THROW (Deployment::InvalidConnection ());
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::finalize_global_binding\t\n");
+ throw Deployment::InvalidConnection ();
}
- ACE_ENDTRY;
}
void
@@ -408,7 +378,7 @@ namespace CIAO
// Find the NodeApplication hosting the component, and then call
// <finishLaunch> on it
- ACE_TRY
+ try
{
Deployment::NodeApplication_var
node_app = this->find_node_application (binding);
@@ -418,18 +388,17 @@ namespace CIAO
ACE_ERROR ((LM_ERROR,
"Execution_Manager_Impl::passivate_shared_components - "
"nil NodeApplication object reference.\n"));
- ACE_THROW (Deployment::StartError ());
+ throw Deployment::StartError ();
}
node_app->passivate_component (binding.name_.c_str ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::passivate_shared_components\t\n");
- ACE_THROW (Deployment::StartError ());
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::passivate_shared_components\t\n");
+ throw Deployment::StartError ();
}
- ACE_ENDTRY;
}
void
@@ -444,7 +413,7 @@ namespace CIAO
// Find the NodeApplication hosting the component, and then call
// <ciao_activate> on it
- ACE_TRY
+ try
{
Deployment::NodeApplication_var
node_app = this->find_node_application (binding);
@@ -454,18 +423,17 @@ namespace CIAO
ACE_ERROR ((LM_ERROR,
"Execution_Manager_Impl::activate_shared_components - "
"nil NodeApplication object reference.\n"));
- ACE_THROW (Deployment::StartError ());
+ throw Deployment::StartError ();
}
node_app->activate_component (binding.name_.c_str ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Execution_Manager_Impl::passivate_shared_components\t\n");
- ACE_THROW (Deployment::StartError ());
+ ex._tao_print_exception (
+ "Execution_Manager_Impl::passivate_shared_components\t\n");
+ throw Deployment::StartError ();
}
- ACE_ENDTRY;
}
@@ -490,7 +458,7 @@ namespace CIAO
"DAnCE (%P|%t) ExecutionManager_Impl.cpp -"
"CIAO::Execution_Manager_Impl::find_node_application -"
"Invalid plan uuid: %s\n", binding.plan_uuid_.c_str ()));
- ACE_THROW (::CORBA::BAD_PARAM ());
+ throw ::CORBA::BAD_PARAM ();
}
// Find the NA based on the NodeName field of the binding
@@ -504,7 +472,7 @@ namespace CIAO
"DAnCE (%P|%t) ExecutionManager_Impl.cpp -"
"CIAO::Execution_Manager_Impl::find_node_application -"
"Invalid node name: %s!\n", binding.node_.c_str ()));
- ACE_THROW (::CORBA::BAD_PARAM ());
+ throw ::CORBA::BAD_PARAM ();
}
return node_app._retn ();