if __EMB_SERVANT_ENV_VAR_NAME in os.environ:
salome_init_without_session()
else:
- salome_init_with_session(path, embedded)
+ import KernelBasis
+ if KernelBasis.getSSLMode():
+ salome_init_without_session()
+ else:
+ salome_init_with_session(path, embedded)
class StandAloneLifecyle:
+ def __init__(self, containerManager, resourcesManager):
+ self._cm = containerManager
+ self._rm = resourcesManager
+
def FindOrLoadComponent(self,contName,moduleName):
global orb
import importlib
return result
#raise RuntimeError("Undealed situation cont = {} module = {}".format(contName,moduleName))
+ def getContainerManager(self):
+ return self._cm
+
+ def getResourcesManager(self):
+ return self._rm
+
def salome_init_without_session():
- global lcc,myStudy,orb,modulcat,sg
- lcc = StandAloneLifecyle()
+ global lcc,myStudy,orb,modulcat,sg,cm
+ import KernelBasis
+ KernelBasis.setSSLMode(True)
import KernelDS
myStudy = KernelDS.myStudy()
import CORBA
import SALOME_ModuleCatalog
from salome_kernel import list_of_catalogs_regarding_environement
modulcat = KernelModuleCatalog.myModuleCatalog( list_of_catalogs_regarding_environement() )
+ import KernelLauncher
+ cm = KernelLauncher.myContainerManager()
+ lcc = StandAloneLifecyle(cm, KernelLauncher.myResourcesManager())
# activate poaManager to accept co-localized CORBA calls.
poa = orb.resolve_initial_references("RootPOA")
poaManager = poa._get_the_POAManager()
global orb, lcc, naming_service, cm, esm, dsm, modulcat
global sg
global myStudy, myStudyName
-
+ import KernelBasis
+ KernelBasis.setSSLMode(False)
try:
if salome_initial:
salome_initial=False
salome_iapp_close()
salome_study_close()
myStudy, myStudyName = None, None
+ import KernelDS
+ KernelDS.KillGlobalSessionInstance()
pass
def salome_NS():