+void shutdownServers()
+{
+ // shutdown data server scopes
+ try
+ {
+ YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
+ runTime->loadModulCatalog();
+ CORBA::ORB_ptr orb = runTime->getOrb();
+ if (orb)
+ {
+ SALOME_NamingService_Wrapper namingService(orb);
+ CORBA::Object_var objDSM(namingService.Resolve(SALOMESDS::DataServerManager::NAME_IN_NS));
+ SALOME::DataServerManager_var dsm(SALOME::DataServerManager::_narrow(objDSM));
+ if ( !CORBA::is_nil(dsm) )
+ dsm->shutdownScopes();
+ }
+ }
+ catch(const CORBA::Exception& )
+ {
+ // ignore and continue
+ }
+ catch(ServiceUnreachable& e)
+ {
+ // ignore and continue
+ }
+}
+