char **argv = &xargv;
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
// LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
+ _NSnew=0;
if (!ns)
{
_NS = new SALOME_NamingService(orb);
+ _NSnew=_NS;
}
else _NS = ns;
//add try catch
SALOME_LifeCycleCORBA::~SALOME_LifeCycleCORBA()
{
+ if(_NSnew)delete _NSnew;
}
//=============================================================================
parms.componentList.length(1);
parms.componentList[0] = componentName;
+ Engines::MachineList_var listOfMachines = _ResManager->GetFittingResources(parms);
+ parms.computerList=listOfMachines;
+
Engines::Component_var compo = _LoadComponent(parms,
componentName,
studyId);
listOfMachines);
if(CORBA::is_nil(compo))
- compo = _LoadComponent(parms,
+ {
+ parms.computerList=listOfMachines;
+ compo = _LoadComponent(parms,
componentName,
studyId);
+ }
return compo._retn();
}
{
// containerName doesn't contain "/" => Local container
params->container_name=CORBA::string_dup(stContainer);
- params->hostname=CORBA::string_dup(Kernel_Utils::GetHostname().c_str());
+ params->hostname="";
}
else
{
string portNumber (::getenv ("NSPORT") );
if ( !portNumber.empty() )
{
+#ifdef WNT
+#else
string cmd ;
cmd = string( "ps -eo pid,command | grep -v grep | grep -E \"omniNames.*")
+ portNumber
}
catch ( ... ) {
}
+#endif
}
// NPAL 18309 (Kill Notifd)
parms.componentList[0] = componentName;
MESSAGE("Starting Parallel Container");
- Engines::Container_var cont = _ContManager->FindOrStartParallelContainer(parms);
+ Engines::Container_var cont = _ContManager->StartParallelContainer(parms);
if (CORBA::is_nil(cont)) {
INFOS("FindOrStartParallelContainer() returns a NULL container !");
return Engines::Component::_nil();
MESSAGE("Creating component instance");
// @PARALLEL@ permits to identify that the component requested
// is a parallel component.
- string name = string(componentName) + string("@PARALLEL@");
+ string name = string(componentName);
Engines::Component_var myInstance = cont->create_component_instance(name.c_str(), studyId);
if (CORBA::is_nil(myInstance))
INFOS("create_component_instance returns a NULL component !");
containerDest->copyFile(containerSrc,fileSrc,fileDest);
}
+/*! \brief get the naming service used by the life cycle
+ *
+ * \return the naming service
+ */
+SALOME_NamingService * SALOME_LifeCycleCORBA::namingService()
+{
+ return _NS;
+}
+
+/*! \brief get the orb used by the life cycle
+ *
+ * \return the orb
+ */
+CORBA::ORB_ptr SALOME_LifeCycleCORBA::orb()
+{
+ return _NS->orb();
+}
+