]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Debug. Now scope server are correctly launched.
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 28 Oct 2014 17:01:56 +0000 (18:01 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Tue, 28 Oct 2014 17:01:56 +0000 (18:01 +0100)
idl/SALOME_SDS.idl
src/SALOMESDS/SALOMESDS_DataServerManager.cxx
src/SALOMESDS/SALOMESDS_DataServerManager.hxx
src/SALOMESDS/SALOME_DataScopeServer.cxx

index 1fabdef1acd07bbd64f71e6ac0604976afe4fa01..51a36bf1014994c098a88ad615f505371d88af36 100644 (file)
@@ -56,6 +56,6 @@ module SALOME
     DataScopeServer getDefaultScope();
     DataScopeServer createDataScope(in string scopeName);
     DataScopeServer retriveDataScope(in string scopeName);
-    DataScopeServer removeDataScope(in string scopeName);
+    void removeDataScope(in string scopeName);
   };
 };
index 69b5b35e785594eaa821b9d4f09f5f82ea8fb26f..ef946e2efa68b1da97cec030e43552ebf76ec84d 100644 (file)
@@ -96,7 +96,7 @@ SALOME::DataScopeServer_ptr DataServerManager::createDataScope(const char *scope
   //
   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);
@@ -105,6 +105,8 @@ SALOME::DataScopeServer_ptr DataServerManager::createDataScope(const char *scope
   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);
     }
@@ -121,10 +123,9 @@ SALOME::DataScopeServer_ptr DataServerManager::retriveDataScope(const char *scop
   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)
index 61e01a1ae2f95e9ab7361810f0c3b64081dbb8f1..55fcd62e39b5ae0d9bbbcb3981505fe0cc242a4b 100644 (file)
@@ -42,7 +42,7 @@ namespace SALOMESDS
     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[];
index 1ffab0a1f5abe058b1ec1acf760fd0c8296b5c61..6dac946379a932cd78ae31654d6713eab6527eaa 100644 (file)
@@ -50,8 +50,7 @@ int main(int argc, char* argv[])
   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());
   //