}
}
_listInstances_map.clear();
-
+ MESSAGE("Engines_Container_i::Shutdown() -- step 2");
// NS unregistering may throw in SSL mode if master process hosting SALOME_Embedded_NamingService servant has vanished
// In this case it's skip it and still continue.
try
catch(...)
{
}
- //
- this->cleanAllPyScripts();
- //
+ MESSAGE("Engines_Container_i::Shutdown() -- step 3");
+ try
+ {
+ this->cleanAllPyScripts();
+ //
+ {
+ AutoGIL gstate;
+ AutoPyRef result = PyObject_CallMethod(_pyCont, (char*)"shutdownPy", (char*)"",nullptr);
+ }
+ }
+ catch(...)
{
- AutoGIL gstate;
- AutoPyRef result = PyObject_CallMethod(_pyCont, (char*)"shutdownPy", (char*)"",nullptr);
}
+ MESSAGE("Engines_Container_i::Shutdown() -- step 4");
//
if(_isServantAloneInProcess)
{
with open(iorfakensfile,"w") as iorfakensf:
iorfakensf.write(NamingService.IOROfNS())
+CM_NAME_IN_NS = "/ContainerManager"
+RM_NAME_IN_NS = "/ResourcesManager"
+DSM_NAME_IN_NS = "/DataServerManager"
+ESM_NAME_IN_NS = "/ExternalServers"
+LOGM_NAME_IN_NS = "/LogManager"
+
def salome_init_without_session_attached(path=None, embedded=False):
"""
Configuration SSL inside a python interpretor launched in the SALOME_Container_No_NS_Serv.
import KernelBasis
nsAbroad = orb.string_to_object( KernelBasis.getIOROfEmbeddedNS() )
import SALOME
- CM_NAME_IN_NS = "/ContainerManager"
cm = orb.string_to_object( nsAbroad.Resolve(CM_NAME_IN_NS).decode() )
type(cm).SetOverrideEnvForContainersSimple = ContainerManagerSetOverrideEnvForContainersSimple
naming_service.Register(cm,CM_NAME_IN_NS)
- RM_NAME_IN_NS = "/ResourcesManager"
rm = orb.string_to_object( nsAbroad.Resolve(RM_NAME_IN_NS).decode() )
naming_service.Register(rm,RM_NAME_IN_NS)
#
from LifeCycleCORBA import LifeCycleCORBASSL
lcc = LifeCycleCORBASSL()
- DSM_NAME_IN_NS = "/DataServerManager"
dsm = orb.string_to_object( nsAbroad.Resolve(DSM_NAME_IN_NS).decode() )
naming_service.Register(dsm,DSM_NAME_IN_NS)
#
- ESM_NAME_IN_NS = "/ExternalServers"
esm = orb.string_to_object( nsAbroad.Resolve(ESM_NAME_IN_NS).decode() )
naming_service.Register(esm,ESM_NAME_IN_NS)
#
- LOGM_NAME_IN_NS = "/LogManager"
logm = orb.string_to_object( nsAbroad.Resolve(LOGM_NAME_IN_NS).decode() )
naming_service.Register(logm,LOGM_NAME_IN_NS)
with open( iorFileName, "w" ) as f:
f.write( cls.IOROfNS() )
NamingService.DumpIORInFile = classmethod(NamingService_DumpIORInFile)
+def NamingService_LoadIORInFile(cls,iorFileName):
+ import Engines
+ import CORBA
+ orb=CORBA.ORB_init([''])
+ with open( iorFileName ) as f:
+ ior = f.read()
+ ref = orb.string_to_object(ior)
+ return ref
+NamingService.LoadIORInFile = classmethod( NamingService_LoadIORInFile )
def NamingService_KillContainersInFile(cls,logFileName):
import Engines
import CORBA