-# Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
"modulePixmap",
"verbose",
"getORB",
- "getNS",
"getLCC",
"getEngine",
"getStudy",
pass
return __orb__
-###
-# Get naming service instance
-###
-__naming_service__ = None
-def getNS():
- global __naming_service__
- if __naming_service__ is None:
- __naming_service__ = SALOME_NamingServicePy_i( getORB() )
- pass
- return __naming_service__
-
##
# Get life cycle CORBA instance
##
def getStudy():
global __study__
if __study__ is None:
- obj = getNS().Resolve( '/Study' )
+ obj = __engine__.getNamingService().Resolve( '/Study' )
__study__ = obj._narrow( SALOMEDS.Study )
pass
return __study__
def getEngine():
global __engine__
if __engine__ is None:
- __engine__ = getLCC().FindOrLoadComponent( "FactoryServerPy", moduleName() )
+ import KernelBasis
+ if KernelBasis.getSSLMode():
+ import salome
+ import PYHELLO
+ from SALOME_ContainerPy import SALOME_ContainerPy_SSL_i
+ poa = salome.orb.resolve_initial_references("RootPOA")
+ poaManager = poa._get_the_POAManager()
+ poaManager.activate()
+ cpy_i = SALOME_ContainerPy_SSL_i(salome.orb, poa, "FactoryServerPy")
+ cpy_ref = cpy_i._this()
+ __engine__ = PYHELLO.PYHELLO(salome.orb,poa,cpy_ref,"FactoryServerPy", "PYHELLO_inst_2" , moduleName())
+ else:
+ __engine__ = getLCC().FindOrLoadComponent( "FactoryServerPy", moduleName() )
pass
return __engine__