DataScopeServer getDefaultScope();
DataScopeServer createDataScope(in string scopeName);
DataScopeServer retriveDataScope(in string scopeName);
- DataScopeServer removeDataScope(in string scopeName);
+ void removeDataScope(in string scopeName);
};
};
//
SALOME_NamingService ns(_orb);
std::string fullScopeName(CreateAbsNameInNSFromScopeName(scopeName));
- std::ostringstream oss; oss << "SALOME_DataScopeServer" << " " << scopeName;
+ std::ostringstream oss; oss << "SALOME_DataScopeServer" << " " << scopeName << " ";
SALOME_ContainerManager::AddOmninamesParams(oss,&ns);
std::string command(oss.str());
SALOME_ContainerManager::MakeTheCommandToBeLaunchedASync(command);
SALOME::DataScopeServer_var ret(SALOME::DataScopeServer::_nil());
while (CORBA::is_nil(ret) && count)
{
+ SALOME_ContainerManager::SleepInSecond(1);
+ count--;
CORBA::Object_var obj(ns.Resolve(fullScopeName.c_str()));
ret=SALOME::DataScopeServer::_narrow(obj);
}
return SALOME::DataScopeServer::_duplicate(*it);
}
-SALOME::DataScopeServer_ptr DataServerManager::removeDataScope(const char *scopeName)
+void DataServerManager::removeDataScope(const char *scopeName)
{
std::list< SALOME::DataScopeServer_var >::iterator it(getScopePtrGivenName(scopeName));
- return SALOME::DataScopeServer::_duplicate(*it);
}
std::string DataServerManager::CreateAbsNameInNSFromScopeName(const std::string& scopeName)
SALOME::DataScopeServer_ptr getDefaultScope();
SALOME::DataScopeServer_ptr createDataScope(const char *scopeName);
SALOME::DataScopeServer_ptr retriveDataScope(const char *scopeName);
- SALOME::DataScopeServer_ptr removeDataScope(const char *scopeName);
+ void removeDataScope(const char *scopeName);
static std::string CreateAbsNameInNSFromScopeName(const std::string& scopeName);
public:
static const char NAME_IN_NS[];
obj=poa2->id_to_reference(id);
SALOME::DataScopeServer_var serverPtr(SALOME::DataScopeServer::_narrow(obj));
//
- std::ostringstream oss; oss << SALOMESDS::DataServerManager::NAME_IN_NS << "/" << scopeName;
- std::string fullScopeName(oss.str());
+ std::string fullScopeName(SALOMESDS::DataServerManager::CreateAbsNameInNSFromScopeName(scopeName));
SALOME_NamingService ns(orb);
ns.Register(serverPtr,fullScopeName.c_str());
//