diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-09-06 08:14:14 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-09-06 08:14:14 +0000 |
commit | f5be93b85788a110f1c6c6edf2550bba1a74f585 (patch) | |
tree | 57183bda04d4b974b4ac3e4152a93ae010f45b6f /cpp/src/IceGrid/ObserverSessionI.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=448 (diff) | |
download | ice-f5be93b85788a110f1c6c6edf2550bba1a74f585.tar.bz2 ice-f5be93b85788a110f1c6c6edf2550bba1a74f585.tar.xz ice-f5be93b85788a110f1c6c6edf2550bba1a74f585.zip |
startUpdate doesn't throw CacheOutOfDate anymore but instead return the
current serial.
Diffstat (limited to 'cpp/src/IceGrid/ObserverSessionI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ObserverSessionI.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/src/IceGrid/ObserverSessionI.cpp b/cpp/src/IceGrid/ObserverSessionI.cpp index 98b16e032a8..df59d636a8d 100644 --- a/cpp/src/IceGrid/ObserverSessionI.cpp +++ b/cpp/src/IceGrid/ObserverSessionI.cpp @@ -73,8 +73,8 @@ ObserverSessionI::setObserversByIdentity(const Ice::Identity& registryObserver, _nodeObserverTopic.subscribe(_nodeObserver); } -void -ObserverSessionI::startUpdate(int serial, const Ice::Current& current) +int +ObserverSessionI::startUpdate(const Ice::Current& current) { Lock sync(*this); if(_destroyed) @@ -84,8 +84,9 @@ ObserverSessionI::startUpdate(int serial, const Ice::Current& current) throw ex; } - _database->lock(serial, this, _userId); + int serial = _database->lock(this, _userId); _updating = true; + return serial; } void @@ -101,7 +102,7 @@ ObserverSessionI::addApplication(const ApplicationDescriptor& app, const Ice::Cu if(!_updating) { - throw AccessDenied(); + throw AccessDeniedException(); } _database->addApplicationDescriptor(this, app); } @@ -119,7 +120,7 @@ ObserverSessionI::updateApplication(const ApplicationUpdateDescriptor& update, c if(!_updating) { - throw AccessDenied(); + throw AccessDeniedException(); } _database->updateApplicationDescriptor(this, update); } @@ -137,7 +138,7 @@ ObserverSessionI::syncApplication(const ApplicationDescriptor& app, const Ice::C if(!_updating) { - throw AccessDenied(); + throw AccessDeniedException(); } _database->syncApplicationDescriptor(this, app); } @@ -155,7 +156,7 @@ ObserverSessionI::removeApplication(const string& name, const Ice::Current& curr if(!_updating) { - throw AccessDenied(); + throw AccessDeniedException(); } _database->removeApplicationDescriptor(this, name); } @@ -173,7 +174,7 @@ ObserverSessionI::finishUpdate(const Ice::Current& current) if(!_updating) { - throw AccessDenied(); + throw AccessDeniedException(); } _database->unlock(this); _updating = false; |