INSTALL(FILES ${PYHELLO_RESOURCES_FILES} DESTINATION ${SALOME_PYHELLO_INSTALL_RES_DATA})
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_PYHELLO_INSTALL_RES_DATA})
+
+SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeAppSL.xml INSTALL ${SALOME_PYHELLO_INSTALL_RES_DATA})
+
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/PYHELLOCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/PYHELLOCatalog.xml INSTALL ${SALOME_PYHELLO_INSTALL_RES_DATA})
#
import PYHELLO_ORB__POA
import SALOME_ComponentPy
+import SALOME_Embedded_NamingService_ClientPy
import SALOME_DriverPy
import SALOMEDS
from PYHELLO_utils import findOrCreateComponent, objectID, moduleName, getStudy
contID, containerName, instanceName, interfaceName, False)
SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
#
- self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
+ emb_ns = self._contId.get_embedded_NS_if_ssl()
+ import CORBA
+ if CORBA.is_nil(emb_ns):
+ self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
+ else:
+ self._naming_service = SALOME_Embedded_NamingService_ClientPy.SALOME_Embedded_NamingService_ClientPy(emb_ns)
#
pass
+ def getNamingService(self):
+ return self._naming_service
+
"""
Get version information.
"""
Create object.
"""
def createObject( self, name ):
- study = getStudy()
+ study = getStudy( self._naming_service )
builder = study.NewBuilder()
father = findOrCreateComponent()
obj = builder.NewObject( father )
"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__