#include "SMESH_Component_Generator.hxx"
#include "SALOME_NamingService.hxx"
+#include "SALOME_Fake_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Exception)
#include "Basics_Utils.hxx"
+#include "KernelBasis.hxx"
#include "utilities.h"
#ifdef WIN32
#endif
#include <stdexcept>
+#include <memory>
#ifndef EXCEPTION
#define EXCEPTION(TYPE, MSG) {\
long aClientPID = (long)getpid();
#endif
- SALOME_NamingService aNamingService(theORB);
- SALOME_LifeCycleCORBA aLifeCycleCORBA(&aNamingService);
+ std::unique_ptr<SALOME_NamingService_Abstract> aNamingService;
+ if(getSSLMode())
+ {
+ aNamingService.reset(new SALOME_Fake_NamingService);
+ }
+ else
+ {
+ aNamingService.reset(new SALOME_NamingService(theORB));
+ }
+ SALOME_LifeCycleCORBA aLifeCycleCORBA(aNamingService.get());
Engines::EngineComponent_var aComponent = aLifeCycleCORBA.FindOrLoad_Component("FactoryServer","SMESH");
aMeshGen = SMESH::SMESH_Gen::_narrow(aComponent);
if ( CORBA::is_nil( myComponentSMESH ) )
{
CORBA::Boolean anIsEmbeddedMode;
- SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService();
- if( dynamic_cast<SALOME_NamingService *>(ns) )
- myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
- else
- {
- Engines::EngineComponent_var comp = RetrieveSMESHInstance();
- myComponentSMESH = SMESH::SMESH_Gen::_narrow(comp);
- }
-
+ myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
+
//MESSAGE("-------------------------------> anIsEmbeddedMode=" << anIsEmbeddedMode);
// 0019923: EDF 765 SMESH : default values of hypothesis
#include "SALOME_KernelServices.hxx"
#include "SALOME_Fake_NamingService.hxx"
#include "SALOME_ModuleCatalog_impl.hxx"
+#include "Utils_SINGLETON.hxx"
SMESH_Gen_No_Session_i::SMESH_Gen_No_Session_i( CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
const char* instanceName,
const char* interfaceName):SMESH_Gen_i(orb,poa,contId,instanceName,interfaceName,false)
{
+ myNS = SINGLETON_<SALOME_Fake_NamingService>::Instance();
}
GEOM::GEOM_Gen_var SMESH_Gen_No_Session_i::GetGeomEngine( bool isShaper )