diff options
Diffstat (limited to 'flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp')
-rw-r--r-- | flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp | 219 |
1 files changed, 131 insertions, 88 deletions
diff --git a/flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp b/flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp index 78d46e8416c..589546bf0fd 100644 --- a/flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp +++ b/flat/CIAO/DAnCE/Plan_Launcher/Plan_Launcher_Base_Impl.cpp @@ -20,16 +20,17 @@ Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl(CORBA::ORB_ptr orb, int argc, em_(DAnCE::ExecutionManagerDaemon::_nil()), em_ior_("file://em.ior") //default , mode_(0x0) { - DANCE_DEBUG ( (LM_TRACE, "[%M] Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - Starting.\n")); + DANCE_TRACE ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl"); if (CORBA::is_nil (this->orb_)) { - DANCE_DEBUG ( (LM_INFO, "[%M] Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - Creating internal ORB.\n")); + DANCE_DEBUG ((LM_INFO, DLINFO "Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "Creating internal ORB.\n")); this->orb_ = CORBA::ORB_init (argc, argv, ""); } this->parse_args(argc, argv); - DANCE_DEBUG ( (LM_TRACE, "[%M] Plan_Launcher_i::init - em_ior = \"%s\"\n" - , is_empty (this->em_ior_) ? "NULL" : this->em_ior_.c_str())); + DANCE_DEBUG ((LM_TRACE, DLINFO "Plan_Launcher_i::init - em_ior = \"%s\"\n" + , is_empty (this->em_ior_) ? "NULL" : this->em_ior_.c_str())); if (this->mode_ & (MODE_START_PLAN | MODE_STOP_PLAN)) { @@ -39,8 +40,10 @@ Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl(CORBA::ORB_ptr orb, int argc, obj = this->orb_->string_to_object(this->em_ior_.c_str()); if (CORBA::is_nil(obj)) { - DANCE_ERROR((LM_ERROR, "[%M] Failed to retrieve EM object from \"%s\"\n", this->em_ior_.c_str())); - throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - failed to retrieve EM object"); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "Failed to retrieve EM object from \"%s\"\n", this->em_ior_.c_str())); + throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "failed to retrieve EM object"); } } try @@ -49,19 +52,22 @@ Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl(CORBA::ORB_ptr orb, int argc, } catch(CORBA::Exception&) { - DANCE_ERROR((LM_ERROR, "[%M] Failed to retrieve EM object from \"%s\"\n", this->em_ior_.c_str())); - throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - failed to retrieve EM object"); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "Failed to retrieve EM object from \"%s\"\n", this->em_ior_.c_str())); + throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "failed to retrieve EM object"); } if (CORBA::is_nil (this->em_.in())) { - DANCE_ERROR ( (LM_ERROR, "[%M] Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - failed to get an execution manager.\n")); - throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - failed to get an execution manager"); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "failed to get an execution manager.\n")); + throw Deployment_Failure ("Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "failed to get an execution manager"); } } - DANCE_DEBUG ( (LM_TRACE, "[%M] Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - Obtained Execution Manager ref \n")); - - DANCE_DEBUG ( (LM_TRACE, "[%M] Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - Completed.\n")); + DANCE_DEBUG ((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::Plan_Launcher_Base_Impl - " + "Obtained Execution Manager ref \n")); } Plan_Launcher_Base_Impl::~Plan_Launcher_Base_Impl() @@ -70,21 +76,26 @@ Plan_Launcher_Base_Impl::~Plan_Launcher_Base_Impl() void Plan_Launcher_Base_Impl::execute() { + DANCE_TRACE ("Plan_Launcher_Base_Impl::execute - "); + if (this->mode_ & MODE_START_PLAN) { size_t sz = this->cdr_plan_urls_.size(); for (size_t i= 0; i < sz; ++i) { - DANCE_DEBUG ( (LM_TRACE, "[%M] execute - launching plan \"%s\"...\n", this->cdr_plan_urls_[i].c_str())); + DANCE_DEBUG ((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::execute - " + "launching plan \"%s\"...\n", this->cdr_plan_urls_[i].c_str())); ::Deployment::DeploymentPlan_var plan = this->read_cdr_plan_file(this->cdr_plan_urls_[i].c_str()); try { CORBA::String_var uuid = this->launch_plan (plan.in()); if (0 == uuid.in ()) { - throw Deployment_Failure ("execute - Error launching plan\n"); + throw Deployment_Failure ("Plan_Launcher_Base_Impl::execute - " + "Error launching plan\n"); } - DANCE_DEBUG ( (LM_DEBUG, "[%M] execute - returned plan UUID is \"%s\"\n", uuid.in ())); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::execute - " + "returned plan UUID is \"%s\"\n", uuid.in ())); } catch (...) { @@ -99,21 +110,23 @@ void Plan_Launcher_Base_Impl::execute() } } -const char *Plan_Launcher_Base_Impl::launch_plan( - const ::Deployment::DeploymentPlan &plan) +const char * +Plan_Launcher_Base_Impl::launch_plan(const ::Deployment::DeploymentPlan &plan) { + DANCE_TRACE ("Plan_Launcher_Base_Impl::launch_plan"); + try { - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - Starting...\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - Starting...\n")); if (CORBA::is_nil (this->em_.in ())) { - DANCE_ERROR ( (LM_ERROR, ACE_TEXT ("launch_plan - ") + DANCE_ERROR ( (LM_ERROR, DLINFO ACE_TEXT ("Plan_Launcher_Base_Impl::launch_plan - ") ACE_TEXT ("launch_plan called witn an uninitialized EM.\n"))); return 0; } - DANCE_DEBUG ( (LM_DEBUG, - ACE_TEXT ("[%M] launch_plan - ") + DANCE_DEBUG ( (LM_DEBUG, DLINFO + ACE_TEXT ("Plan_Launcher_Base_Impl::launch_plan - ") ACE_TEXT ("about to call this->em_->preparePlan\n"))); ::Deployment::DomainApplicationManager_var dam; @@ -123,35 +136,40 @@ const char *Plan_Launcher_Base_Impl::launch_plan( } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] launch_plan - An exception was thrown during EM->preparePlan.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "An exception was thrown during EM->preparePlan.\n")); throw; } - DANCE_DEBUG ( (LM_DEBUG, - ACE_TEXT ("[%M] launch_plan - ") + DANCE_DEBUG ( (LM_DEBUG, DLINFO + ACE_TEXT ("Plan_Launcher_Base_Impl::launch_plan - ") ACE_TEXT ("after to call this->em_->preparePlan\n"))); if (CORBA::is_nil (dam.in ())) { - DANCE_ERROR ( (LM_ERROR, "[%M] launch_plan - CIAO_PlanLauncher:preparePlan call failed: " - "nil DomainApplicationManager reference\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "CIAO_PlanLauncher:preparePlan call failed: " + "nil DomainApplicationManager reference\n")); return 0; } else { - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - DAM was received from preparePlan.\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "DAM was received from preparePlan.\n")); } this->write_dam_ior (dam.in()); - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - Obtained DAM ref \n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "Obtained DAM ref \n")); ::Deployment::Properties_var properties; ACE_NEW_RETURN (properties, Deployment::Properties, 0); - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - before startLaunch...\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "before startLaunch...\n")); ::Deployment::Connections_var conns; Deployment::Application_var da; @@ -161,42 +179,50 @@ const char *Plan_Launcher_Base_Impl::launch_plan( } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] launch_plan - An exception was thrown during DAM->startLaunch.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "An exception was thrown during DAM->startLaunch.\n")); throw; } //Deployment::DomainApplication_var da = Deployment::DomainApplication::_narrow(obj) if (CORBA::is_nil (da.in())) { - DANCE_ERROR ( (LM_ERROR, "[%M] launch_plan - CIAO_PlanLauncher:startLaunch call failed: " + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "CIAO_PlanLauncher:startLaunch call failed: " "nil DomainApplication reference\n")); return 0; } else { - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - DomainApplication was received from startLaunch\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "DomainApplication was received from startLaunch\n")); } //this is temporal workaround while cdmw checks object type in connect call - DANCE_DEBUG ( (LM_DEBUG, "[%M] Press any key after deployment on other node finished\n")); + /* + DANCE_DEBUG ((LM_DEBUG, DLINFO "Press any key after deployment on other node finished\n")); getchar(); - + */ this->create_external_connections (plan, conns.inout()); // Call finish Launch to complete the connections - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - before finishLaunch\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "before finishLaunch\n")); try { da->finishLaunch (conns.in(), false); // is_ReDAC by default is <false> } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] launch_plan - An exception was thrown during DA->finishLaunch.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "An exception was thrown during DA->finishLaunch.\n")); throw; } - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - after finishLaunch\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "after finishLaunch\n")); // Call start to activate components - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - before start activating components...\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "before start activating components...\n")); try { @@ -204,20 +230,21 @@ const char *Plan_Launcher_Base_Impl::launch_plan( } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] launch_plan - An exception was thrown during DA->start.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::launch_plan - " + "An exception was thrown during DA->start.\n")); throw; } - DANCE_DEBUG ( (LM_DEBUG, "[%M] launch_plan - [success]\n")); - DANCE_DEBUG ( (LM_DEBUG, - ACE_TEXT ("[%M] Plan_Launcher_i::launch_plan - ") + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::launch_plan - [success]\n")); + DANCE_DEBUG ( (LM_DEBUG, DLINFO + ACE_TEXT ("[%M] Plan_Launcher_Base_Impl::launch_plan - ") ACE_TEXT ("Application Deployed successfully\n"))); } catch (const Deployment::ResourceNotAvailable& ex) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - EXCEPTION: ResourceNotAvaiable exception caught: %s,\n" + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - EXCEPTION: ResourceNotAvaiable exception caught: %s,\n" "Type: %s\n" "Property: %s\n" "Element: %s\n" @@ -227,49 +254,49 @@ const char *Plan_Launcher_Base_Impl::launch_plan( ex.propertyName.in (), ex.elementName.in (), ex.resourceName.in ()); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } catch (const Deployment::StartError& ex) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - EXCEPTION: StartError exception caught: %s, %s\n", + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - EXCEPTION: StartError exception caught: %s, %s\n", ex.name.in (), ex.reason.in ()); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } catch (const Deployment::InvalidProperty& ex) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - EXCEPTION: InvalidProperty exception caught: %s, %s\n", + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - EXCEPTION: InvalidProperty exception caught: %s, %s\n", ex.name.in (), ex.reason.in ()); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } catch (const Deployment::InvalidConnection& ex) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - EXCEPTION: InvalidConnection exception caught: %s, %s\n", + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - EXCEPTION: InvalidConnection exception caught: %s, %s\n", ex.name.in (), ex.reason.in ()); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } catch (const CORBA::Exception& ex) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - CORBA EXCEPTION: %s\n", + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - CORBA EXCEPTION: %s\n", ex._info().fast_rep()); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } catch (...) { char buf[1024]; - ACE_OS::sprintf (buf, "Plan_Launcher_i::launch_plan - EXCEPTION: non-CORBA exception\n"); - DANCE_ERROR ( (LM_ERROR, "[%M] %s", buf)); + ACE_OS::sprintf (buf, "Plan_Launcher_Base_Impl::launch_plan - EXCEPTION: non-CORBA exception\n"); + DANCE_ERROR ((LM_ERROR, DLINFO "%s", buf)); throw Deployment_Failure (buf); } @@ -278,15 +305,18 @@ const char *Plan_Launcher_Base_Impl::launch_plan( bool Plan_Launcher_Base_Impl::teardown_plan(const char *uuid) { + DANCE_TRACE ("Plan_Launcher_Base_Impl::teardown_plan"); + try { - DANCE_DEBUG ( (LM_DEBUG, "[%M] teardown_plan - looking for uuid=\"%s\"\n", uuid)); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::teardown_plan - looking for uuid=\"%s\"\n", uuid)); ::Deployment::DomainApplicationManagers_var mgrs = this->em_->getManagers(); ::Deployment::DomainApplicationManager_var dapp_mgr; for (size_t i = 0; i < mgrs->length(); ++i) { ACE_CString s = (*mgrs) [i]->getPlan()->UUID.in(); - DANCE_DEBUG ( (LM_DEBUG, "[%M] teardown_plan - comparing with existing uuid=\"%s\"\n", s.c_str())); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::teardown_plan - " + "comparing with existing uuid=\"%s\"\n", s.c_str())); if (s == uuid) { dapp_mgr = ::Deployment::DomainApplicationManager::_duplicate ( (*mgrs) [i].in()); @@ -307,23 +337,25 @@ bool Plan_Launcher_Base_Impl::teardown_plan(const char *uuid) { // @todo the destroy_dam_by_plan could give a stoperror exception // we should handle - DANCE_ERROR ( (LM_ERROR, "[%M] Unable to find DomainApplicationManager " - "for plan with uuid: %s\n", uuid)); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::teardown_plan - " + "Unable to find DomainApplicationManager " + "for plan with uuid: %s\n", uuid)); return false; } return true; } -void Plan_Launcher_Base_Impl::teardown_plan( - ::Deployment::DomainApplicationManager_ptr dam) +void +Plan_Launcher_Base_Impl::teardown_plan(::Deployment::DomainApplicationManager_ptr dam) { - DANCE_DEBUG ( (LM_DEBUG, - "[%M] Plan_Launcher_Base_Impl::teardown_plan - destroy the application.....\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO + "Plan_Launcher_Base_Impl::teardown_plan - destroy the application.....\n")); ::Deployment::Applications_var apps = dam->getApplications(); if (0 == apps->length()) { - DANCE_DEBUG((LM_ERROR, "[%M] Plan_Launcher_Base_Impl::teardown_plan - DAM has no application.\n")); + DANCE_DEBUG((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::teardown_plan - " + "DAM has no application.\n")); } for (size_t i = 0; i < apps->length(); ++i) { @@ -331,17 +363,17 @@ void Plan_Launcher_Base_Impl::teardown_plan( } this->destroy_dam(dam); - DANCE_DEBUG ( (LM_DEBUG, "[%M] Plan_Launcher_Base_Impl::teardown_plan - [success]\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::teardown_plan - [success]\n")); } void Plan_Launcher_Base_Impl::destroy_dam( ::Deployment::DomainApplicationManager_ptr dam) { - DANCE_DEBUG ( (LM_DEBUG, - "[%M] Plan_Launcher_Base_Impl::destroy_dam - destroy the manager.....\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO + "Plan_Launcher_Base_Impl::destroy_dam - destroy the manager.....\n")); this->em_->destroyManager(dam); - DANCE_DEBUG ( (LM_DEBUG, "[%M] Plan_Launcher_Base_Impl::destroy_dam - [success]\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "Plan_Launcher_Base_Impl::destroy_dam - [success]\n")); } void Plan_Launcher_Base_Impl::usage(const ACE_TCHAR* program) @@ -366,7 +398,7 @@ void Plan_Launcher_Base_Impl::usage(const ACE_TCHAR* program) void Plan_Launcher_Base_Impl::parse_args(int argc, ACE_TCHAR *argv[]) { - DANCE_DEBUG ( (LM_TRACE, "[%M] PL options : \"")); + DANCE_DEBUG ((LM_TRACE, DLINFO "PL options : \"")); for (int i = 0; i < argc; ++i) { DANCE_DEBUG ( (LM_TRACE, " %s", argv[i])); @@ -409,7 +441,7 @@ void Plan_Launcher_Base_Impl::parse_args(int argc, ACE_TCHAR *argv[]) case 'w': if (0 < this->cdr_dest_url_.length()) { - DANCE_ERROR((LM_ERROR, "[%M] Ambiguity: more then one --write-cdr-plan option.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Ambiguity: more then one --write-cdr-plan option.\n")); throw Deployment_Failure("Ambiguity: more then one --write-cdr-plan option."); } this->cdr_dest_url_ = expand_env_vars (get_opt.opt_arg()); @@ -468,36 +500,42 @@ void Plan_Launcher_Base_Impl::write_dam_ior( } else { - DANCE_ERROR ( (LM_ERROR, "[%M] PlanLauncher.cpp::write_dap_ior - Error in opening file %s to write DAM IOR: %m", + DANCE_ERROR ((LM_ERROR, DLINFO "PlanLauncher.cpp::write_dap_ior - Error in opening file %s to write DAM IOR: %m", this->dam_ior_.c_str())); throw Deployment_Failure (ACE_CString ("write_dap_ior - Error in opening file %s to write DAM IOR: %m") + this->dam_ior_); } } -void Plan_Launcher_Base_Impl::stop_plan() +void +Plan_Launcher_Base_Impl::stop_plan() { bool stopped = false; if (!is_empty (this->plan_uuid_)) { stopped = true; - ACE_TRACE((LM_TRACE, "[%M] Stopping plan \"%s\"\n", this->plan_uuid_.c_str())); + DANCE_DEBUG((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "Stopping plan \"%s\"\n", this->plan_uuid_.c_str())); + if (!this->teardown_plan(this->plan_uuid_.c_str())) { - DANCE_ERROR ( (LM_ERROR, "[%M] stop_plan - tear down assembly failed: unknown plan uuid.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "tear down assembly failed: unknown plan uuid.\n")); } } if (!is_empty (this->dam_ior_)) { stopped = true; - ACE_TRACE((LM_TRACE, "[%M] Stopping plan by DAM IOR.\n")); + DANCE_DEBUG((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "Stopping plan by DAM IOR.\n")); CORBA::Object_var obj = this->orb_->string_to_object(this->dam_ior_.c_str()); if (CORBA::is_nil (obj.in ())) { - DANCE_ERROR ((LM_ERROR, - "[%M] stop_plan - tear down assembly failed: DAM IOR is invalid.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO + "Plan_Launcher_Base_Impl::stop_plan - " + "tear down assembly failed: DAM IOR is invalid.\n")); } else { @@ -513,18 +551,21 @@ void Plan_Launcher_Base_Impl::stop_plan() size_t sz = this->cdr_plan_urls_.size(); for (size_t i = 0; i < sz; ++i) { - ACE_TRACE((LM_TRACE, "[%M] Stopping plan by plan file : %s\n", this->cdr_plan_urls_[i].c_str())); + DANCE_DEBUG((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "Stopping plan by plan file : %s\n", this->cdr_plan_urls_[i].c_str())); ::Deployment::DeploymentPlan_var plan = this->read_cdr_plan_file(this->cdr_plan_urls_[i].c_str()); if (!this->teardown_plan(plan->UUID.in())) { - DANCE_ERROR ( (LM_ERROR, "[%M] stop_plan - tear down assembly failed: unknown plan uuid.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "tear down assembly failed: unknown plan uuid.\n")); } } } if (!stopped && 0 == this->xml_plan_urls_.size()) { - ACE_TRACE((LM_TRACE, "[%M] Stopping plan all running plans.\n")); + DANCE_DEBUG((LM_TRACE, DLINFO "Plan_Launcher_Base_Impl::stop_plan - " + "Stopping plan all running plans.\n")); ::Deployment::DomainApplicationManagers_var mgrs = this->em_->getManagers(); ::Deployment::DomainApplicationManager_var dapp_mgr; @@ -538,7 +579,7 @@ void Plan_Launcher_Base_Impl::stop_plan() void Plan_Launcher_Base_Impl::create_external_connections( const ::Deployment::DeploymentPlan &plan, Deployment::Connections& conn) { - DANCE_DEBUG ( (LM_DEBUG, "[%M] create_external_connections - start\n")); + DANCE_DEBUG ((LM_DEBUG, DLINFO "create_external_connections - start\n")); /* CORBA::Object_var obj = this->orb_->resolve_initial_references("NameService"); CosNaming::NamingContext_var naming = CosNaming::NamingContext::_narrow(obj.in()); CosNaming::BindingList_var bl; @@ -640,13 +681,14 @@ Deployment::DeploymentPlan*Plan_Launcher_Base_Impl::read_cdr_plan_file( } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] Failed to read CDR plan file.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Failed to read CDR plan file.\n")); throw Deployment_Failure("Failed to read CDR plan file."); } return res; } -void Plan_Launcher_Base_Impl::write_cdr_plan_file(const char * filename, +void +Plan_Launcher_Base_Impl::write_cdr_plan_file(const char * filename, const Deployment::DeploymentPlan & plan) { try @@ -670,7 +712,8 @@ void Plan_Launcher_Base_Impl::write_cdr_plan_file(const char * filename, } catch(...) { - DANCE_ERROR((LM_ERROR, "[%M] Failed to write CDR plan file.\n")); + DANCE_ERROR ((LM_ERROR, DLINFO "Plan_Launcher_Base_Impl::write_cdr_plan_file - " + "Failed to write CDR plan file.\n")); throw Deployment_Failure("Failed to write CDR plan file."); } } @@ -759,10 +802,10 @@ Plan_Launcher_Base_Impl::expand_env_vars (const char * s) } else { - DANCE_DEBUG ( (LM_WARNING - , "Envvar can not be parsed out at %i in \"%s\"" - , pos_start - , src.c_str())); + DANCE_DEBUG ((LM_WARNING, DLINFO "Plan_Launcher_Base_Impl::expand_env_vars - " + "Envvar can not be parsed out at %i in \"%s\"", + pos_start, + src.c_str())); } } } |