+ CORBA::string_free(reason);
+
+ Engines::EngineComponent_var myInstance =
+ cont->create_component_instance(componentName, studyId);
+ return myInstance._retn();
+}
+
+//=============================================================================
+/*! \brief Load a parallel component instance.
+ *
+ * \param params machine parameters like type or name...
+ * \param componentName the name of component class
+ * \param studyId default = 0 : multistudy instance
+ * \return a CORBA reference of the parallel component instance, or _nil if problem
+ */
+//=============================================================================
+Engines::EngineComponent_ptr
+SALOME_LifeCycleCORBA::Load_ParallelComponent(const Engines::ContainerParameters& params,
+ const char *componentName,
+ int studyId)
+{
+ MESSAGE("Entering LoadParallelComponent");
+
+/*MESSAGE("Parameters : ");
+ MESSAGE("Container name : " << params.container_name);
+ MESSAGE("Number of component nodes : " << params.nb_component_nodes);
+ MESSAGE("Component Name : " << componentName);*/
+
+ Engines::ContainerParameters parms(params);
+ parms.resource_params.componentList.length(1);
+ parms.resource_params.componentList[0] = componentName;
+ parms.mode = CORBA::string_dup("findorstart");
+
+ MESSAGE("Starting Parallel Container");
+ Engines::Container_var cont = _ContManager->GiveContainer(parms);
+ if (CORBA::is_nil(cont)) {
+ INFOS("FindOrStartParallelContainer() returns a NULL container !");
+ return Engines::EngineComponent::_nil();
+ }
+
+ MESSAGE("Loading component library");
+ char* reason;
+ bool isLoadable = cont->load_component_Library(componentName,reason);
+ if (!isLoadable) {
+ INFOS(componentName <<" library is not loadable !");
+ //std::cerr << reason << std::endl;
+ CORBA::string_free(reason);
+ return Engines::EngineComponent::_nil();
+ }
+ CORBA::string_free(reason);
+
+ MESSAGE("Creating component instance");
+ // @PARALLEL@ permits to identify that the component requested
+ // is a parallel component.
+ std::string name = std::string(componentName);
+ Engines::EngineComponent_var myInstance = cont->create_component_instance(name.c_str(), studyId);
+ if (CORBA::is_nil(myInstance))
+ INFOS("create_component_instance returns a NULL component !");
+ return myInstance._retn();
+}
+
+/*! \brief copy a file from a source host to a destination host
+ * \param hostSrc the source host
+ * \param fileSrc the file to copy from the source host to the destination host
+ * \param hostDest the destination host
+ * \param fileDest the destination file
+ */
+void SALOME_LifeCycleCORBA::copyFile(const char* hostSrc, const char* fileSrc, const char* hostDest, const char* fileDest)
+{
+ if(strcmp(hostDest,"localhost") == 0)