Index: src/IceGrid/AdapterCache.cpp =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/AdapterCache.cpp,v retrieving revision 1.47 diff -r1.47 AdapterCache.cpp 10a11 > #include 70c71,75 < ServerAdapterEntryPtr --- > AdapterCache::AdapterCache(const Ice::CommunicatorPtr& communicator) : _communicator(communicator) > { > } > > void 74c79,84 < assert(!getImpl(desc.id)); --- > if(getImpl(desc.id)) > { > Ice::Error out(_communicator->getLogger()); > out << "can't add duplicate adapter `" << desc.id << "'"; > return; > } 89,90d98 < < return entry; 93c101 < ReplicaGroupEntryPtr --- > void 97,100c105,112 < assert(!getImpl(desc.id)); < ReplicaGroupEntryPtr entry = new ReplicaGroupEntry(*this, desc.id, app, desc.loadBalancing); < addImpl(desc.id, entry); < return entry; --- > if(getImpl(desc.id)) > { > Ice::Error out(_communicator->getLogger()); > out << "can't add duplicate replica group `" << desc.id << "'"; > return; > } > > addImpl(desc.id, new ReplicaGroupEntry(*this, desc.id, app, desc.loadBalancing)); 121c133,138 < assert(entry); --- > if(!entry) > { > Ice::Error out(_communicator->getLogger()); > out << "can't remove unknown adapter `" << id << "'"; > return; > } 136a154,160 > ReplicaGroupEntryPtr entry = ReplicaGroupEntryPtr::dynamicCast(getImpl(id)); > if(!entry) > { > Ice::Error out(_communicator->getLogger()); > out << "can't remove unknown replica group `" << id << "'"; > return; > } Index: src/IceGrid/AdapterCache.h =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/AdapterCache.h,v retrieving revision 1.35 diff -r1.35 AdapterCache.h 115,116c115,118 < ServerAdapterEntryPtr addServerAdapter(const AdapterDescriptor&, const ServerEntryPtr&, const std::string&); < ReplicaGroupEntryPtr addReplicaGroup(const ReplicaGroupDescriptor&, const std::string&); --- > AdapterCache(const Ice::CommunicatorPtr&); > > void addServerAdapter(const AdapterDescriptor&, const ServerEntryPtr&, const std::string&); > void addReplicaGroup(const ReplicaGroupDescriptor&, const std::string&); 127a130,132 > private: > > const Ice::CommunicatorPtr _communicator; Index: src/IceGrid/AllocatableObjectCache.cpp =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/AllocatableObjectCache.cpp,v retrieving revision 1.10 diff -r1.10 AllocatableObjectCache.cpp 134c134,139 < assert(!getImpl(id)); --- > if(getImpl(id)) > { > Ice::Error out(_communicator->getLogger()); > out << "can't add duplicate allocatable object `" << _communicator->identityToString(id) << "'"; > return; > } 172c177,181 < assert(entry); --- > if(!entry) > { > Ice::Error out(_communicator->getLogger()); > out << "can't remove unknown object `" << _communicator->identityToString(id) << "'"; > } Index: src/IceGrid/Database.cpp =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/Database.cpp,v retrieving revision 1.125 diff -r1.125 Database.cpp 60a61 > _adapterCache(_communicator), Index: src/IceGrid/DescriptorHelper.cpp =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/DescriptorHelper.cpp,v retrieving revision 1.116 diff -r1.116 DescriptorHelper.cpp 963a964 > objectIds.insert(q->id); 967c968,975 < ids.insert(q->id); --- > if(ids.find(q->id) == ids.end()) > { > objectIds.insert(q->id); > } > else > { > ids.erase(q->id); > } 969d976 < objectIds.insert(ids.begin(), ids.end()); Index: src/IceGrid/ObjectCache.cpp =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/ObjectCache.cpp,v retrieving revision 1.36 diff -r1.36 ObjectCache.cpp 82c82,87 < assert(!getImpl(id)); --- > if(getImpl(id)) > { > Ice::Error out(_communicator->getLogger()); > out << "can't add duplicate object `" << _communicator->identityToString(id) << "'"; > return; > } 113c118 < ObjectEntryPtr --- > void 118c123,128 < assert(entry); --- > if(!entry) > { > Ice::Error out(_communicator->getLogger()); > out << "can't remove unknown object `" << _communicator->identityToString(id) << "'"; > return; > } 133,134d142 < < return entry; Index: src/IceGrid/ObjectCache.h =================================================================== RCS file: /home/cvsroot/ice/src/IceGrid/ObjectCache.h,v retrieving revision 1.23 diff -r1.23 ObjectCache.h 51c51 < ObjectEntryPtr remove(const Ice::Identity&); --- > void remove(const Ice::Identity&); Index: test/IceGrid/update/AllTests.cpp =================================================================== RCS file: /home/cvsroot/ice/test/IceGrid/update/AllTests.cpp,v retrieving revision 1.32 diff -r1.32 AllTests.cpp 462c462,563 < cout << "ok" << endl; --- > > info = admin->getServerInfo("Server"); > test(info.descriptor); > object = ObjectDescriptor(); > object.id = communicator->stringToIdentity("test"); > info.descriptor->adapters[0].objects.push_back(object); > update = empty; > update.nodes[0].servers.push_back(info.descriptor); > try > { > admin->updateApplication(update); > test(false); > } > catch(const DeploymentException&) > { > // Object already exists > } > catch(const Ice::Exception& ex) > { > cerr << ex << endl; > test(false); > } > > info = admin->getServerInfo("Server"); > test(info.descriptor); > object = ObjectDescriptor(); > object.id = communicator->stringToIdentity("test1"); > info.descriptor->adapters[0].allocatables.push_back(object); > update = empty; > update.nodes[0].servers.push_back(info.descriptor); > try > { > admin->updateApplication(update); > test(true); > } > catch(const Ice::Exception& ex) > { > cerr << ex << endl; > test(false); > } > > info = admin->getServerInfo("Server"); > test(info.descriptor); > object = ObjectDescriptor(); > object.id = communicator->stringToIdentity("test1"); > info.descriptor->adapters[0].allocatables.push_back(object); > update = empty; > update.nodes[0].servers.push_back(info.descriptor); > try > { > admin->updateApplication(update); > test(false); > } > catch(const DeploymentException&) > { > // Object already exists > } > catch(const Ice::Exception& ex) > { > cerr << ex << endl; > test(false); > } > > info = admin->getServerInfo("Server"); > test(info.descriptor); > object = ObjectDescriptor(); > object.id = communicator->stringToIdentity("test"); > info.descriptor->adapters[0].allocatables.push_back(object); > update = empty; > update.nodes[0].servers.push_back(info.descriptor); > try > { > admin->updateApplication(update); > test(true); > } > catch(const Ice::Exception& ex) > { > cerr << ex << endl; > test(false); > } > > info = admin->getServerInfo("Server"); > test(info.descriptor); > object = ObjectDescriptor(); > object.id = communicator->stringToIdentity("test"); > info.descriptor->adapters[0].allocatables.push_back(object); > update = empty; > update.nodes[0].servers.push_back(info.descriptor); > try > { > admin->updateApplication(update); > test(false); > } > catch(const DeploymentException&) > { > // Object already exists > } > catch(const Ice::Exception& ex) > { > cerr << ex << endl; > test(false); > } 464a566,567 > > cout << "ok" << endl;