Salome HOME
Warining hunting that solves a big bug in Release mode...
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 17 Aug 2015 13:56:10 +0000 (15:56 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 17 Aug 2015 13:56:10 +0000 (15:56 +0200)
idl/SALOME_SDS.idl
src/SALOMESDS/SALOMESDS_DataScopeServer.cxx
src/SALOMESDS/SALOMESDS_DataServerManager.cxx

index cabea85c95c825a6526d8d3b06854cea208e45ff..a01e1576c2114c777c4f66fff1919b8a695bab2e 100644 (file)
@@ -138,10 +138,10 @@ module SALOME
     boolean isAliveAndKicking(in string scopeName) raises (SALOME::SALOME_Exception);
     //
     DataScopeServer createDataScope(in string scopeName) raises (SALOME::SALOME_Exception);
-    DataScopeServer giveADataScopeCalled(in string scopeName, out boolean isCreated);
+    DataScopeServer giveADataScopeCalled(in string scopeName, out boolean isCreated) raises (SALOME::SALOME_Exception);
     //
     DataScopeServerTransaction createDataScopeTransaction(in string scopeName) raises (SALOME::SALOME_Exception);
-    DataScopeServerTransaction giveADataScopeTransactionCalled(in string scopeName, out boolean isCreated);
+    DataScopeServerTransaction giveADataScopeTransactionCalled(in string scopeName, out boolean isCreated) raises (SALOME::SALOME_Exception);
     //
     DataScopeServerBase retriveDataScope(in string scopeName) raises (SALOME::SALOME_Exception);
     void removeDataScope(in string scopeName) raises (SALOME::SALOME_Exception);
index e471c502f8b46ddd85a19ee3aa6fbd78b65e1940..0775efc7de2d518e55907e65dc96a63cc0ecedac 100644 (file)
@@ -56,7 +56,7 @@ DataScopeServerBase::DataScopeServerBase(CORBA::ORB_ptr orb, SALOME::DataScopeKi
 {
 }
 
-DataScopeServerBase::DataScopeServerBase(const DataScopeServerBase& other):_globals(0),_locals(0),_pickler(0),_name(other._name),_vars(other._vars),_killer(other._killer)
+DataScopeServerBase::DataScopeServerBase(const DataScopeServerBase& other):omniServant(other),ServantBase(other),_globals(0),_locals(0),_pickler(0),_name(other._name),_vars(other._vars),_killer(other._killer)
 {
 }
 
@@ -434,7 +434,7 @@ DataScopeServer::DataScopeServer(CORBA::ORB_ptr orb, SALOME::DataScopeKiller_var
 {
 }
 
-DataScopeServer::DataScopeServer(const DataScopeServer& other):DataScopeServerBase(other)
+DataScopeServer::DataScopeServer(const DataScopeServer& other):omniServant(other),ServantBase(other),DataScopeServerBase(other)
 {
 }
 
@@ -493,7 +493,7 @@ DataScopeServerTransaction::DataScopeServerTransaction(CORBA::ORB_ptr orb, SALOM
   _poa_for_key_waiter=poa2;
 }
 
-DataScopeServerTransaction::DataScopeServerTransaction(const DataScopeServerTransaction& other):DataScopeServerBase(other),_poa_for_key_waiter(other.getPOA4KeyWaiter())
+DataScopeServerTransaction::DataScopeServerTransaction(const DataScopeServerTransaction& other):omniServant(other),ServantBase(other),DataScopeServerBase(other),_poa_for_key_waiter(other.getPOA4KeyWaiter())
 {
 }
 
@@ -672,7 +672,7 @@ SALOME::Transaction_ptr DataScopeServerTransaction::addKeyValueInVarErrorIfAlrea
   TransactionAddKeyValueErrorIfAlreadyExisting *ret(new TransactionAddKeyValueErrorIfAlreadyExisting(this,varName,key,value));
   CORBA::Object_var obj(ret->activate());
   return SALOME::Transaction::_narrow(obj);
-};
+}
 
 SALOME::TransactionMultiKeyAddSession_ptr DataScopeServerTransaction::addMultiKeyValueSession(const char *varName)
 {
@@ -737,7 +737,7 @@ SALOME::ByteVec *DataScopeServerTransaction::waitForMonoThrRev(SALOME::KeyWaiter
   if(!retc)
     throw Exception("DataScopeServerTransaction::invokeMonoThr : internal error 1 !");
   retc->_remove_ref();
-  retc->waitForMonoThr();
+  return retc->waitForMonoThr();
 }
 
 void DataScopeServerTransaction::atomicApply(const SALOME::ListOfTransaction& transactions)
index f8b2678e02840971286ae86983d58c484d166a2e..aa281bf78abb15b387d1d74e6250996d819f8b13 100644 (file)
@@ -122,6 +122,11 @@ typename T::PtrType CreateDataScope(const std::string& scopeName, const std::vec
   std::string command(oss.str());
   SALOME_ContainerManager::MakeTheCommandToBeLaunchedASync(command);
   int status(SALOME_ContainerManager::SystemThreadSafe(command.c_str()));
+  if(status!=0)
+    {
+      std::ostringstream oss2; oss2 << "CreateDataScope : Fail to launch \"" << command << "\" ! Return code was : " << status << " !";
+      throw Exception(oss2.str());
+    }
   int count(SALOME_ContainerManager::GetTimeOutToLoaunchServer());
   typename T::VarType ret(T::nil());
   while (CORBA::is_nil(ret) && count)
@@ -286,7 +291,6 @@ std::vector<std::string> DataServerManager::listOfScopesCpp()
 
 SALOME::DataScopeServerBase_var DataServerManager::GetScopePtrGivenName(const std::string& scopeName, const std::vector<std::string>& scopes, SALOME_NamingService& ns)
 {
-  std::size_t sz(scopes.size());
   if(std::find(scopes.begin(),scopes.end(),scopeName)==scopes.end())
     {
       std::ostringstream oss; oss << "DataServerManager::getScopePtrGivenName : scope name \"" << scopeName << "\" does not exist !";