summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/Plan_Launcher
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/Plan_Launcher')
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher.cpp342
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher.mpc33
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp420
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h113
-rw-r--r--CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl_Export.h58
5 files changed, 0 insertions, 966 deletions
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.cpp b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.cpp
deleted file mode 100644
index 73f208c72b1..00000000000
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.cpp
+++ /dev/null
@@ -1,342 +0,0 @@
-// $Id$
-
-#include "Plan_Launcher_Impl.h"
-
-#include "ace/OS.h"
-#include "ace/Get_Opt.h"
-#include <iostream>
-
-#include "DAnCE/Interfaces/ExecutionManagerDaemonC.h"
-
-namespace CIAO
-{
- namespace Plan_Launcher
- {
- // deployment plan URL
- const char* deployment_plan_url = 0;
- bool use_package_name = true;
- const char* package_names = 0;
- const char* package_types = 0;
- const char* new_deployment_plan_url = 0;
- const char* plan_uuid = 0;
- bool em_use_naming = false;
- const char* em_ior_file = "file://em.ior";
- bool rm_use_naming = false;
- bool use_repoman = false;
- const char* rm_ior_file = "file://rm.ior";
- const char* repoman_name_ = "RepositoryManager";
- const char* dap_ior_filename = 0;
- const char* dap_ior = 0;
-
- enum mode_type {
- pl_mode_start,
- pl_mode_interactive,
- pl_mode_stop_by_dam,
- pl_mode_stop_by_uuid,
- pl_mode_redeployment
- };
-
- // default mode
- mode_type mode = pl_mode_interactive;
-
- static void
- usage (const ACE_TCHAR* program)
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("[(%P|%t) Executor] Usage: %s\n")
- ACE_TEXT ("-a <PACKAGE_NAMES>\n")
- ACE_TEXT ("-e <PACKAGE_TYPES>\n")
- ACE_TEXT ("-p <DEPLOYMENT_PLAN_URL>\n")
- ACE_TEXT ("-n : Use naming service to fetch EM")
- ACE_TEXT ("-k <EXECUTION_MANAGER_IOR>")
- ACE_TEXT (" : Default file://em.ior\n")
- ACE_TEXT ("-l <REPOSITORY_MANAGER_IOR>")
- ACE_TEXT (" : Default file://rm.ior\n")
- ACE_TEXT ("-v <REPOSITORY_MANAGER_NAME>: Use naming service to fetch RM with the given name")
- ACE_TEXT (" : Default RepositoryManager\n")
- ACE_TEXT ("-t <PLAN_UUID>\n")
- ACE_TEXT ("-o <DOMAIN_APPLICATION_MANAGER_IOR_OUTPUT_FILE>\n")
- ACE_TEXT ("-i <DOMAIN_APPLICATION_MANAGER_IOR_FOR_INPUT>\n")
- ACE_TEXT ("-r <NEW_PLAN_DESCRIPTOR_FOR_REDEPLOYMENT>\n")
- ACE_TEXT ("-h : Show this usage information\n"),
- program));
- }
-
- static bool
- parse_args (int argc,
- ACE_TCHAR *argv[])
- {
- ACE_Get_Opt get_opt (argc,
- argv,
- ACE_TEXT ("a:e:p:nk:l:v:t:o:i:r:h"));
- int c;
-
- while ((c = get_opt ()) != EOF)
- {
- switch (c)
- {
- case 'a':
- package_names = get_opt.opt_arg ();
- use_package_name = true;
- break;
- case 'e':
- package_types = get_opt.opt_arg ();
- use_package_name = false;
- break;
- case 'p':
- deployment_plan_url = get_opt.opt_arg ();
- break;
- case 'n':
- em_use_naming = true;
- break;
- case 'k':
- em_ior_file = get_opt.opt_arg ();
- break;
- case 'l':
- use_repoman = true;
- rm_ior_file = get_opt.opt_arg ();
- break;
- case 'v':
- use_repoman = true;
- rm_use_naming = true;
- repoman_name_ = get_opt.opt_arg ();
- break;
- case 'o':
- dap_ior_filename = get_opt.opt_arg ();
- mode = pl_mode_start;
- break;
- case 'i':
- dap_ior = get_opt.opt_arg ();
- mode = pl_mode_stop_by_dam;
- break;
- case 't':
- plan_uuid = get_opt.opt_arg ();
- mode = pl_mode_stop_by_uuid;
- break;
- case 'r':
- new_deployment_plan_url = get_opt.opt_arg ();
- mode = pl_mode_redeployment;
- break;
- case 'h':
- default:
- usage(argv[0]);
- return false;
- }
- }
-
- if ((mode != pl_mode_stop_by_dam) &&
- (mode != pl_mode_stop_by_uuid) &&
- (package_names == 0) &&
- (package_types == 0) &&
- (deployment_plan_url == 0) &&
- (new_deployment_plan_url == 0))
- {
- usage (argv[0]);
- return false;
- }
-
- return true;
- }
-
- static ::Deployment::DomainApplicationManager_ptr
- read_dap_ior (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj = orb->string_to_object (dap_ior
- ACE_ENV_ARG_PARAMETER);
- return
- Deployment::DomainApplicationManager::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- }
-
- static int
- write_dap_ior (CORBA::ORB_ptr orb,
- ::Deployment::DomainApplicationManager_ptr dap
- ACE_ENV_ARG_DECL)
- {
- CORBA::String_var ior = orb->object_to_string (dap);
-
- FILE* ior_output_file = ACE_OS::fopen (dap_ior_filename, "w");
-
- if (ior_output_file)
- {
- ACE_OS::fprintf (ior_output_file, "%s", ior.in ());
- ACE_OS::fclose (ior_output_file);
-
- return 0;
- }
-
- return -1;
- }
-
- static int
- run_main_implementation (int argc, char *argv[])
- {
- ACE_DECLARE_NEW_CORBA_ENV;
-
- ACE_TRY
- {
- CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- ""
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (parse_args (argc, argv) == false)
- return -1;
-
- Plan_Launcher_i launcher;
-
- if (!launcher.init (em_use_naming ? 0 : em_ior_file,
- orb.in (),
- use_repoman,
- rm_use_naming,
- rm_use_naming ? repoman_name_ : rm_ior_file))
- {
- ACE_ERROR ((LM_ERROR, "(%P|%t) Plan_Launcher: Error initializing the EM.\n"));
- return -1;
- }
-
- ::Deployment::DomainApplicationManager_var dapp_mgr;
-
- if (mode == pl_mode_start || mode == pl_mode_interactive) // initial deployment
- {
- const char* uuid = 0;
-
- if (package_names != 0)
- uuid = launcher.launch_plan (deployment_plan_url,
- package_names,
- use_package_name,
- use_repoman);
- else
- uuid = launcher.launch_plan (deployment_plan_url,
- package_types,
- use_package_name,
- use_repoman);
-
- if (uuid == 0)
- {
- ACE_ERROR ((LM_ERROR, "(%P|%t) Plan_Launcher: Error launching plan\n"));
- return -1;
- }
-
- ACE_DEBUG ((LM_DEBUG, "Plan_Launcher returned UUID is %s\n", uuid));
- dapp_mgr = launcher.get_dam (uuid);
-
- // Write out DAM ior if requested
- if (mode == pl_mode_start)
- {
- write_dap_ior (orb.in (), dapp_mgr.in ());
- }
- else // if (pl_mode_interactive)
- {
- ACE_DEBUG ((LM_DEBUG,
- "Press <Enter> to tear down application\n"));
- char dummy [256];
- std::cin.getline (dummy, 256);
-
- // Tear down the assembly
- ACE_DEBUG ((LM_DEBUG,
- "Plan_Launcher: destroy the application....."));
- if (! launcher.teardown_plan (uuid))
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) CIAO_PlanLauncher:tear down assembly failed: "
- "unkonw plan uuid.\n"));
- }
- }
- else if (mode == pl_mode_redeployment && new_deployment_plan_url != 0) // do redeployment
- {
- ACE_DEBUG ((LM_DEBUG,
- "Plan_Launcher: reconfigure application assembly....."));
-
- const char* uuid;
-
- if (package_names != 0)
- uuid = launcher.re_launch_plan (new_deployment_plan_url,
- package_names,
- use_package_name,
- use_repoman);
- else
- uuid = launcher.re_launch_plan (new_deployment_plan_url,
- package_types,
- use_package_name,
- use_repoman);
-
- if (uuid == 0)
- {
- ACE_ERROR ((LM_ERROR, "(%P|%t) Plan_Launcher: Error re-launching plan\n"));
- return -1;
- }
- }
- else if (mode == pl_mode_stop_by_dam) // tear down by DAM
- {
- dapp_mgr = read_dap_ior (orb.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- if (CORBA::is_nil (dapp_mgr.in ()))
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) CIAO_PlanLauncher:tear down assembly failed: "
- "nil DomainApplicationManager reference\n"));
- return -1;
- }
-
- // Tear down the assembly
- ACE_DEBUG ((LM_DEBUG,
- "Plan_Launcher: destroy the application....."));
- launcher.teardown_plan (dapp_mgr.in ());
- }
- else if (mode == pl_mode_stop_by_uuid) // tear down by plan_uuid
- {
- // Tear down the assembly
- ACE_DEBUG ((LM_DEBUG,
- "Plan_Launcher: destroy the application....."));
- if (! launcher.teardown_plan (plan_uuid))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) CIAO_PlanLauncher:tear down assembly failed: "
- "unkown plan uuid.\n"));
- }
- }
-
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- }
- ACE_CATCH (Plan_Launcher_i::Deployment_Failure, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "Deployment failed. Plan_Launcher exiting.\n"));
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "(%P|%t) Plan_Launcher: ");
-
- return -1;
- }
- ACE_CATCHALL
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) Plan_Launcher: Unknown exception.\n"));
- return -1;
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
-
- return 0;
- }
- }
-}
-
-using namespace CIAO::Plan_Launcher;
-
-int
-ACE_TMAIN (int argc,
- ACE_TCHAR *argv[])
-{
- //ACE_DEBUG ((LM_DEBUG, "NEW PLAN LAUNCHER\n"));
-
- return run_main_implementation (argc, argv);
-}
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.mpc b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.mpc
deleted file mode 100644
index f264738108a..00000000000
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher.mpc
+++ /dev/null
@@ -1,33 +0,0 @@
-// -*- MPC -*-
-// $Id$
-
-project(Plan_Launcher_Impl) : ciao_servant_dnc, ciao_config_handlers, ciao_executionmanager_stub, ciao_plan_generator {
- sharedname = Plan_Launcher_Impl
-
- dynamicflags = PLAN_LAUNCHER_IMPL_BUILD_DLL
-
- Source_Files {
- ../ExecutionManager/DAM_Map.cpp
- Plan_Launcher_Impl.cpp
- }
-
- Header_Files {
- ../ExecutionManager/DAM_Map.h
- Plan_Launcher_Impl.h
- Plan_Launcher_Impl_Export.h
- }
-}
-
-project(Plan_Launcher) : ciao_server_dnc, ciao_config_handlers, ciao_executionmanager_stub, ciao_plan_generator {
- exename = plan_launcher
-
- after += Plan_Launcher_Impl
- libs += Plan_Launcher_Impl
-
- Source_Files {
- Plan_Launcher.cpp
- }
-
- Header_Files {
- }
-}
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp
deleted file mode 100644
index 7a8793ec559..00000000000
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-// $Id$
-#include "Plan_Launcher_Impl.h"
-#include "orbsvcs/CosNamingC.h"
-#include "Config_Handlers/XML_File_Intf.h"
-#include "Config_Handlers/DnC_Dump.h"
-
-#include <iostream>
-#include <string>
-
-namespace CIAO
-{
- namespace Plan_Launcher
- {
- static CORBA::Object_ptr
- fetch_reference_naming (CORBA::ORB_ptr orb
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var tmp =
- orb->resolve_initial_references ("NameService"
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CosNaming::NamingContext_var pns =
- CosNaming::NamingContext::_narrow (tmp.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- CosNaming::Name name (1);
- name.length (1);
-
- name[0].id = CORBA::string_dup ("ExecutionManager");
-
- return pns->resolve (name
- ACE_ENV_ARG_PARAMETER);
- }
-
- Plan_Launcher_i::Plan_Launcher_i ()
- : em_ (), pg_ ()
- {
- }
-
- bool
- Plan_Launcher_i::init (const char *em_ior,
- CORBA::ORB_ptr orb,
- bool use_repoman,
- bool rm_use_naming,
- const char *rm_name
- ACE_ENV_ARG_DECL)
- {
- CORBA::Object_var obj;
-
- // EM
- if (em_ior == 0)
- {
- obj = fetch_reference_naming (orb ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
- else
- {
- obj = orb->string_to_object (em_ior
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
- }
-
- this->em_ = ::CIAO::ExecutionManagerDaemon::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
-
- if (CORBA::is_nil (this->em_.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) CIAO_PlanLauncher: nil Execution"
- " Manager reference, narrow failed\n"));
- return false;
- }
-
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) CIAO_PlanLauncher: Obtained Execution"
- " Manager ref \n"));
- }
-
- if (use_repoman)
- return pg_.init (orb, rm_use_naming, rm_name);
-
- return true;
- }
-
-
- const char *
- Plan_Launcher_i::launch_plan (const char *deployment_plan_uri,
- const char *package_uri,
- bool use_package_name,
- bool use_repoman
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Plan_Launcher_i::Deployment_Failure))
- {
- ACE_DEBUG ((LM_DEBUG, "Parsing plan...\n"));
-
- CIAO::Config_Handlers::XML_File_Intf intf (deployment_plan_uri);
-
- ::Deployment::DeploymentPlan_var plan =
- intf.get_plan ();
-
- // Use the package name(s) or type(s) to modify the location of all the
- // artifacts in DeploymentPlan.
- if (use_repoman)
- {
- pg_.generate_plan (plan, package_uri, use_package_name);
- }
-
- ACE_DEBUG ((LM_DEBUG, "Parsing complete....\n"));
-
- return this->launch_plan (plan.in ());
- }
-
- const char *
- Plan_Launcher_i::launch_plan (const ::Deployment::DeploymentPlan &plan ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Plan_Launcher_i::Deployment_Failure))
- {
- ACE_TRY
- {
- if (CORBA::is_nil (this->em_.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("CIAO::Plan_Launcher_i: ")
- ACE_TEXT ("launch_plan called witn an uninitialized EM.\n")));
- return 0;
- }
-
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("CIAO::Plan_Launcher_i: " )
- ACE_TEXT ("about to call this->em_->preparePlan\n")));
- }
-
- ::Deployment::DomainApplicationManager_var dam (this->em_->preparePlan (plan, 1));
-
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("CIAO::Plan_Launcher_i: " )
- ACE_TEXT ("after to call this->em_->preparePlan\n")));
- }
-
- if (CORBA::is_nil (dam.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- "(%P|%t) CIAO_PlanLauncher:preparePlan call failed: "
- "nil DomainApplicationManager reference\n"));
- return 0;
- }
-
- if (CIAO::debug_level () > 9)
- {
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: Obtained DAM ref \n"));
- }
-
- ::Deployment::Properties_var properties;
- ACE_NEW_RETURN (properties,
- Deployment::Properties,
- 0);
-
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: start Launch application...\n"));
- }
-
- // Dont not start the Application immediately since it vialtes
- // the semantics of component activation sequence
- int start = 0;
-
- dam->startLaunch (properties.in (), 0);
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
-
- // Call finish Launch to complete the connections
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: finish Launch application...\n"));
- dam->finishLaunch (start, false); // is_ReDAC by default is <false>
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
-
- // Call start to activate components
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: start activating components...\n"));
- dam->start ();
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("CIAO_PlanLauncher: ")
- ACE_TEXT ("Application Deployed successfully\n")));
-
- map_.bind_dam_reference (plan.UUID.in (),
- Deployment::DomainApplicationManager::_duplicate (dam.in ()));
- }
- ACE_CATCH (Deployment::ResourceNotAvailable, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "EXCEPTION: ResourceNotAvaiable exception caught: %s,\n"
- "Type: %s\n"
- "Property: %s\n"
- "Element: %s\n"
- "Resource: %s\n",
- ex.name.in (),
- ex.resourceType.in (),
- ex.propertyName.in (),
- ex.elementName.in (),
- ex.resourceName.in ()));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_CATCH (Deployment::StartError, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "EXCEPTION: StartError exception caught: %s, %s\n",
- ex.name.in (),
- ex.reason.in ()));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_CATCH (Deployment::InvalidProperty, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "EXCEPTION: InvalidProperty exception caught: %s, %s\n",
- ex.name.in (),
- ex.reason.in ()));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_CATCH (Deployment::InvalidConnection, ex)
- {
- ACE_ERROR ((LM_ERROR,
- "EXCEPTION: InvalidConnection exception caught: %s, %s\n",
- ex.name.in (),
- ex.reason.in ()));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR,
- "CORBA EXCEPTION: %s\n",
- ACE_ANY_EXCEPTION._info().fast_rep()));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_CATCHALL
- {
- ACE_ERROR ((LM_ERROR,
- "EXCEPTION: non-CORBA exception\n"));
- ACE_THROW (Deployment_Failure (""));
- }
- ACE_ENDTRY;
- ACE_CHECK_RETURN (0);
-
- std::string * retv = new std::string (plan.UUID.in ());
-
- return (*retv).c_str ();
- }
-
- ::Deployment::DomainApplicationManager_ptr
- Plan_Launcher_i::get_dam (const char *uuid ACE_ENV_ARG_DECL)
- {
- if (!this->map_.is_plan_available (uuid))
- {
- // Note: we could do an exhaustive (and expensive!) search of the DAMS
- // on our EM at this point, if we wanted. In most cases, though, this
- // would not produce a different result.
- return Deployment::DomainApplicationManager::_nil ();
- }
- return this->map_.fetch_dam_reference (uuid);
- }
-
- bool
- Plan_Launcher_i::teardown_plan (const char *uuid)
- {
- // Since people could always run another instance of the Plan_Launcher
- // executable to tear down a plan, so we could NOT rely on the local
- // DAM_Map to fetch DAM obj reference. Instead, we make a remote call
- // on ExecutionManager to fetch it.
- ACE_TRY
- {
- ::Deployment::DomainApplicationManager_var dapp_mgr =
- this->em_->getManager (uuid);
-
- if (!::CORBA::is_nil (dapp_mgr.in ()))
- {
- dapp_mgr->destroyApplication ();
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
- }
-
- // Note that we should ask the DAM to tell EM whether the DAM should
- // be destroyed
- this->destroy_dam_by_plan (uuid);
- }
- }
- ACE_CATCHANY
- {
- ACE_ERROR ((LM_ERROR, "Unable to find DomainApplicationManager "
- "for plan with uuid: %s\n", uuid));
- return false;
- }
- ACE_ENDTRY;
-
- return true;
- }
-
- bool
- Plan_Launcher_i::teardown_plan (::Deployment::DomainApplicationManager_ptr dam
- ACE_ENV_ARG_DECL)
- {
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: destroy the application.....\n"));
- }
-
- dam->destroyApplication ();
-
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
- }
-
- this->destroy_dam (dam);
-
- return true;
- }
-
- void
- Plan_Launcher_i::destroy_dam (::Deployment::DomainApplicationManager_ptr dam
- ACE_ENV_ARG_DECL)
- {
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: destroy the manager.....\n"));
- }
-
- this->em_->destroyManager (dam);
-
- if (CIAO::debug_level ())
- {
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
- }
- }
-
- void
- Plan_Launcher_i::destroy_dam_by_plan (const char* plan_uuid
- ACE_ENV_ARG_DECL)
- {
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: destroy the manager.....\n"));
-
- this->em_->destroyManagerByPlan (plan_uuid);
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG, "[success]\n"));
- }
-
- const char *
- Plan_Launcher_i::re_launch_plan (const char *deployment_plan_uri,
- const char *package_uri,
- bool use_package_name,
- bool use_repoman
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Plan_Launcher_i::Deployment_Failure))
- {
- CIAO::Config_Handlers::XML_File_Intf intf (deployment_plan_uri);
-
- ::Deployment::DeploymentPlan_var plan =
- intf.get_plan ();
-
- // Use the package name(s) or type(s) to modify the location of all the
- // artifacts in DeploymentPlan.
- if (use_repoman)
- {
- pg_.generate_plan (plan, package_uri, use_package_name);
- }
-
- //::Deployment::DnC_Dump::dump (plan.in ());
-
- return this->re_launch_plan (plan.in ());
- }
-
- const char *
- Plan_Launcher_i::re_launch_plan (const ::Deployment::DeploymentPlan &plan ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((Plan_Launcher_i::Deployment_Failure))
- {
-
- if (CORBA::is_nil (this->em_.in ()))
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("CIAO::Plan_Launcher_i: ")
- ACE_TEXT ("re_launch_plan called witn an uninitialized EM.\n")));
- return 0;
- }
-
- this->em_->perform_redeployment (plan);
-
- if (CIAO::debug_level ())
- ACE_DEBUG ((LM_DEBUG,
- "CIAO_PlanLauncher: new plan redeployed ...\n"));
-
- std::string * retv = new std::string (plan.UUID.in ());
-
- return (*retv).c_str ();
- }
- }
-}
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h
deleted file mode 100644
index 085ee4d8c0c..00000000000
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * $Id$
- * @file Plan_Launcher_Impl.h
- * @author Will Otte <wotte@dre.vanderbilt.edu>
- *
- * Contains the Plan_Launcher_i class, which can be used by
- * applications to launch component assemblies.
- */
-#ifndef PLAN_LAUNCHER_IMPL_H
-#define PLAN_LAUNCHER_IMPL_H
-
-#include "Plan_Launcher_Impl_Export.h"
-#include "ciao/DeploymentS.h"
-#include "ciao/CIAO_common.h"
-#include "DAnCE/ExecutionManager/DAM_Map.h"
-#include "DAnCE/Interfaces/ExecutionManagerDaemonC.h"
-#include "DAnCE/Plan_Generator/Plan_Generator_Impl.h"
-
-namespace CIAO
-{
- namespace Plan_Launcher
- {
- /**
- * @class Plan_Launcher_i
- * @brief This class launches and manages deployment plans.
- */
- class Plan_Launcher_Impl_Export Plan_Launcher_i
- {
- public:
- class Deployment_Failure {
- public:
- Deployment_Failure (const ACE_CString &error)
- : error_ (error)
- {
- }
-
- ACE_CString error_;
- };
-
- Plan_Launcher_i ();
-
-
- bool init (const char *em_ior,
- CORBA::ORB_ptr orb,
- bool use_repoman = 0,
- bool rm_use_naming = 0,
- const char *rm_name = 0
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /**
- * @fn launch_plan
- * @brief Launch a plan, given a deployment plan URI
- * @param plan_uri A uri that points ot a valid deployment plan
- * @returns a string containing the UUID of the plan. Null indicates failure.
- */
- const char * launch_plan (const char *deployment_plan_uri,
- const char *package_uri = 0,
- bool use_package_name = 1,
- bool use_repoman = 0
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment_Failure));
-
- const char * re_launch_plan (const char *deployment_plan_uri,
- const char *package_uri = 0,
- bool use_package_name = 1,
- bool use_repoman = 0
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment_Failure));
-
- /**
- * @fn launch_plan
- * @brief Launch a plan, given an IDL deployment plan
- * @param plan A valid IDL deployment plan
- * @returns a string containing the UUID of the plan. Null indicates failure.
- */
- const char * launch_plan (const ::Deployment::DeploymentPlan &plan
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment_Failure));
-
- const char * re_launch_plan (const ::Deployment::DeploymentPlan &plan
- ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((Deployment_Failure));
-
- /// Returns the DAM associated with a given plan URI
- ::Deployment::DomainApplicationManager_ptr get_dam (const char *uuid
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- /// Tears down a plan given the UUID
- bool teardown_plan (const char *uuid ACE_ENV_ARG_DECL);
-
- bool teardown_plan (::Deployment::DomainApplicationManager_ptr dam
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- void destroy_dam (::Deployment::DomainApplicationManager_ptr dam
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- void destroy_dam_by_plan (const char * plan_uuid
- ACE_ENV_ARG_DECL_WITH_DEFAULTS);
-
- private:
- ::CIAO::ExecutionManagerDaemon_var em_;
-
- /// Local map for DAMs, to save expensive UUID lookups.
- Execution_Manager::DAM_Map map_;
-
- CIAO::Plan_Generator::Plan_Generator_i pg_;
- };
-
- }
-}
-
-
-#endif /* PLAN_LAUNCHER_IMPL_H */
diff --git a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl_Export.h b/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl_Export.h
deleted file mode 100644
index 1c85d1b98c9..00000000000
--- a/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Impl_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 Config_Handlers
-// ------------------------------
-#ifndef PLAN_LAUNCHER_IMPL_EXPORT_H
-#define PLAN_LAUNCHER_IMPL_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (PLAN_LAUNCHER_IMPL_HAS_DLL)
-# define PLAN_LAUNCHER_IMPL_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && PLAN_LAUNCHER_IMPL_HAS_DLL */
-
-#if !defined (PLAN_LAUNCHER_IMPL_HAS_DLL)
-# define PLAN_LAUNCHER_IMPL_HAS_DLL 1
-#endif /* ! PLAN_LAUNCHER_IMPL_HAS_DLL */
-
-#if defined (PLAN_LAUNCHER_IMPL_HAS_DLL) && (PLAN_LAUNCHER_IMPL_HAS_DLL == 1)
-# if defined (PLAN_LAUNCHER_IMPL_BUILD_DLL)
-# define Plan_Launcher_Impl_Export ACE_Proper_Export_Flag
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* PLAN_LAUNCHER_IMPL_BUILD_DLL */
-# define Plan_Launcher_Impl_Export ACE_Proper_Import_Flag
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* PLAN_LAUNCHER_IMPL_BUILD_DLL */
-#else /* PLAN_LAUNCHER_IMPL_HAS_DLL == 1 */
-# define Plan_Launcher_Impl_Export
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARATION(T)
-# define PLAN_LAUNCHER_IMPL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* PLAN_LAUNCHER_IMPL_HAS_DLL == 1 */
-
-// Set PLAN_LAUNCHER_IMPL_NTRACE = 0 to turn on library specific tracing even if
-// tracing is turned off for ACE.
-#if !defined (PLAN_LAUNCHER_IMPL_NTRACE)
-# if (ACE_NTRACE == 1)
-# define PLAN_LAUNCHER_IMPL_NTRACE 1
-# else /* (ACE_NTRACE == 1) */
-# define PLAN_LAUNCHER_IMPL_NTRACE 0
-# endif /* (ACE_NTRACE == 1) */
-#endif /* !PLAN_LAUNCHER_IMPL_NTRACE */
-
-#if (PLAN_LAUNCHER_IMPL_NTRACE == 1)
-# define PLAN_LAUNCHER_IMPL_TRACE(X)
-#else /* (PLAN_LAUNCHER_IMPL_NTRACE == 1) */
-# if !defined (ACE_HAS_TRACE)
-# define ACE_HAS_TRACE
-# endif /* ACE_HAS_TRACE */
-# define PLAN_LAUNCHER_IMPL_TRACE(X) ACE_TRACE_IMPL(X)
-# include "ace/Trace.h"
-#endif /* (PLAN_LAUNCHER_IMPL_NTRACE == 1) */
-
-#endif /* PLAN_LAUNCHER_IMPL_EXPORT_H */
-
-// End of auto generated file.