// SALOMEDS_DriverFactory
//###############################################################################################################
-SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB)
+SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail)
{
_orb = CORBA::ORB::_duplicate(theORB);
- _name_service = new SALOME_NamingService(_orb);
+ if(isNSAvail)
+ _name_service = new SALOME_NamingService(_orb);
}
{
protected:
CORBA::ORB_var _orb;
- SALOME_NamingService* _name_service;
+ SALOME_NamingService* _name_service = nullptr;
public:
- SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB);
+ SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB, bool isNSAvail = true);
virtual ~SALOMEDS_DriverFactory_i();
{
_orb = CORBA::ORB::_duplicate(orb);
_impl = new SALOMEDSImpl_Study();
- _factory = new SALOMEDS_DriverFactory_i(_orb);
+ _factory = new SALOMEDS_DriverFactory_i(_orb,!CORBA::is_nil(session));
_closed = true;
Init(session);