}
IncompatibleComponent::IncompatibleComponent(const IncompatibleComponent &ex):
- SALOME_Exception( ex )
+ SALOME_Exception( ex )
{
}
*/
//=============================================================================
-/*!
+/*!
* Constructor
*/
//=============================================================================
}
else _NS = ns;
//add try catch
- _NS->Change_Directory("/"); // mpv 250105: current directory may be not root
+ _NS->Change_Directory("/"); // mpv 250105: current directory may be not root
// (in SALOMEDS for an example)
// not enough: set a current directory in naming service is not thread safe
// if naming service instance is shared among several threads...
}
//=============================================================================
-/*!
+/*!
* Destructor
*/
//=============================================================================
// containerName doesn't contain "/" => Local container
params.container_name = CORBA::string_dup(stContainer);
}
- else
+ else
{
stContainer[rg]='\0';
params.container_name = CORBA::string_dup(stContainer+rg+1);
try
{
CORBA::Object_var obj = _NS->Resolve("/Kernel/ModulCatalog");
- SALOME_ModuleCatalog::ModuleCatalog_var Catalog =
+ SALOME_ModuleCatalog::ModuleCatalog_var Catalog =
SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj) ;
ASSERT(! CORBA::is_nil(Catalog));
- SALOME_ModuleCatalog::Acomponent_var compoInfo =
+ SALOME_ModuleCatalog::Acomponent_var compoInfo =
Catalog->GetComponent(componentName);
- if (CORBA::is_nil (compoInfo))
+ if (CORBA::is_nil (compoInfo))
{
MESSAGE("Catalog Error: Component not found in the catalog " << componentName);
return false;
*/
//=============================================================================
-void
+void
SALOME_LifeCycleCORBA::preSet(Engines::ResourceParameters& params)
{
params.name = "";
}
//=============================================================================
-/*!
+/*!
* \return a number of processors not 0, only for MPI containers
*/
//=============================================================================
{
// get each Container from NamingService => shutdown it
// (the order is inverse to the order of servers initialization)
-
+
SALOME::Session_var session = SALOME::Session::_nil();
CORBA::Long pid = 0;
CORBA::Object_var objS = _NS->Resolve("/Kernel/Session");
}
std::string hostname = Kernel_Utils::GetHostname();
-
+
// 1) ConnectionManager
try
{
{
// ignore and continue
}
-
+
//Wait some time so that launcher be completely shutdown
#ifndef WIN32
nanosleep(&ts_req,0);
name.length(1);
name[0].id = CORBA::string_dup(stdname.c_str());
try
- {
- if(!CORBA::is_nil(orb))
+ {
+ if(!CORBA::is_nil(orb))
theObj = orb->resolve_initial_references("NameService");
if (!CORBA::is_nil(theObj))
inc = CosNaming::NamingContext::_narrow(theObj);
catch(...)
{
}
- if(!CORBA::is_nil(inc))
+ if(!CORBA::is_nil(inc))
{
try
{
void SALOME_LifeCycleCORBA::killOmniNames()
{
std::string portNumber (::getenv ("NSPORT") );
- if ( !portNumber.empty() )
+ if ( !portNumber.empty() )
{
#ifdef WNT
#else
}
#endif
}
-
+
// NPAL 18309 (Kill Notifd)
- if ( !portNumber.empty() )
+ if ( !portNumber.empty() )
{
std::string cmd = ("from killSalomeWithPort import killNotifdAndClean; ");
cmd += std::string("killNotifdAndClean(") + portNumber + "); ";
MESSAGE(cmd);
system( cmd.c_str() );
}
+
+ // shutdown portmanager
+ if ( !portNumber.empty() )
+ {
+ std::string cmd = ("from PortManager import releasePort; ");
+ cmd += std::string("releasePort(") + portNumber + "); ";
+ cmd = std::string("python -c \"") + cmd +"\" > /dev/null 2> /dev/null";
+ MESSAGE(cmd);
+ system( cmd.c_str() );
+ }
}
//=============================================================================
*/
//=============================================================================
-Engines::EngineComponent_ptr
+Engines::EngineComponent_ptr
SALOME_LifeCycleCORBA::
-_LoadComponent(const Engines::ContainerParameters& params,
+_LoadComponent(const Engines::ContainerParameters& params,
const char *componentName,
int studyId)
{
char* reason;
bool isLoadable = cont->load_component_Library(componentName,reason);
- if (!isLoadable)
+ if (!isLoadable)
{
//std::cerr << reason << std::endl;
CORBA::string_free(reason);