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 ()));
        }