Ejemplo n.º 1
0
  void
  Homed_Component_Handler_i::install_instance (const ::Deployment::DeploymentPlan &plan,
                                               ::CORBA::ULong instanceRef,
                                               ::CORBA::Any_out instance_reference)
  {
    CIAO_TRACE ("Homed_Component_Handler_i::install_instance");

    CORBA::Any *any = 0;
    ACE_NEW_THROW_EX (any,
                      CORBA::Any (),
                      CORBA::NO_MEMORY ());

    instance_reference = any;

    const ::Deployment::InstanceDeploymentDescription &idd (plan.instance[instanceRef]);
    const ::Deployment::MonolithicDeploymentDescription &mdd (plan.implementation[idd.implementationRef]);

    CIAO_DEBUG (7, (LM_DEBUG, CLINFO
                    "Homed_Component_Handler_i::install_instance - "
                    "Starting deployment of <%C>\n",
                    plan.instance[instanceRef].name.in ()));
    DAnCE::Utility::PROPERTY_MAP *pmap;

    ACE_NEW_THROW_EX (pmap,
                      DAnCE::Utility::PROPERTY_MAP (idd.configProperty.length () +
                                                    mdd.execParameter.length ()),
                      CORBA::NO_MEMORY ());

    Deployment_Common::Instance_Info info;
    info.name = idd.name.in ();
    info.pmap.reset (pmap);

    DAnCE::Utility::build_property_map (*pmap,
                                        mdd.execParameter);
    DAnCE::Utility::build_property_map (*pmap,
                                        idd.configProperty);

    using namespace CIAO::Deployment;
    CORBA::Any val;
    const char *tmp = 0;

    if (pmap->find (COMPONENT_HOME, val) == 0)
        {
          val >>= tmp;
          CIAO_DEBUG (9, (LM_TRACE, CLINFO
                          "Homed_Component_Handler_i::install_instance - "
                          "Found component home ID %C\n", tmp));
        }
Ejemplo n.º 2
0
  void
  Component_Handler_i::install_instance (const ::Deployment::DeploymentPlan &plan,
                                         ::CORBA::ULong instanceRef,
                                         ::CORBA::Any_out instance_reference)
  {
    CORBA::Any *retval = 0;
    ACE_NEW_THROW_EX (retval,
                      CORBA::Any (),
                      CORBA::NO_MEMORY ());

    instance_reference = retval;

    CIAO_TRACE ("Component_Handler_i::install_instance");

    const ::Deployment::InstanceDeploymentDescription &idd (plan.instance[instanceRef]);
    const ::Deployment::MonolithicDeploymentDescription &mdd (plan.implementation[idd.implementationRef]);

    DAnCE::Utility::PROPERTY_MAP *pmap = 0;

    ACE_NEW_THROW_EX (pmap,
                      DAnCE::Utility::PROPERTY_MAP (idd.configProperty.length () +
                                                    mdd.execParameter.length ()),
                      CORBA::NO_MEMORY ());

    Deployment_Common::Instance_Info info;
    info.name = idd.name.in ();
    info.pmap.reset (pmap);

    DAnCE::Utility::build_property_map (*pmap,
                                        mdd.execParameter);
    DAnCE::Utility::build_property_map (*pmap,
                                        idd.configProperty);

    CORBA::String_var exec_art, exec_entry, svnt_art, svnt_entry, cont_id;

    CORBA::Any val;
    const char *tmp = 0;
    int open_mode = ACE_DEFAULT_SHLIB_MODE;

    if (pmap->find (CIAO::Deployment::SVNT_ENTRYPT, val) == 0)
        {
          val >>= tmp;
          svnt_entry = tmp;
          CIAO_DEBUG (9, (LM_TRACE, CLINFO
                          "Component_Handler_i::install_instance - "
                          "Found Servant entrypoint <%C>\n", svnt_entry.in ()));
        }
Ejemplo n.º 3
0
void
DAnCE_NodeManager_Module::create_nm_properties (DAnCE::Utility::PROPERTY_MAP &props)
{
  {
    CORBA::Any val;
    val <<= this->options_.timeout_;
    props.bind (DAnCE::LOCALITY_TIMEOUT, val);
  }
  {
    CORBA::Any val;
    val <<= this->root_poa_.in ();
    props.bind (DAnCE::ENTITY_POA, val);
  }
  {
    CORBA::Any val;
    val <<= CORBA::Any::from_string (CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (this->options_.cs_path_)),0);
    props.bind (DAnCE::LOCALITY_EXECUTABLE, val);
  }
  {
    CORBA::Any val;
    val <<= CORBA::Any::from_string (CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (this->options_.server_args_)),0);
    props.bind (DAnCE::LOCALITY_ARGUMENTS, val);
  }
  if (this->options_.locality_config_ != "")
    {
      CORBA::Any val;
      val <<= CORBA::Any::from_string (CORBA::string_dup (this->options_.locality_config_.c_str ()), 0);
      props.bind (DAnCE::DANCE_LM_CONFIGFILE, val);
    }
  if (this->options_.instance_nc_)
    {
      CORBA::Any val;
      val <<= CORBA::Any::from_string (CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (this->options_.instance_nc_)), 0);
      props.bind (DAnCE::INSTANCE_NC, val);
    }
  if (this->options_.domain_nc_)
    {
      CORBA::Any val;
      val <<= CORBA::Any::from_string (CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (this->options_.domain_nc_)), 0);
      props.bind (DAnCE::DOMAIN_NC, val);
    }
}