summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/EvictorI.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/cpp/src/Freeze/EvictorI.cpp b/cpp/src/Freeze/EvictorI.cpp
index 842a5e0930d..6df199fc543 100644
--- a/cpp/src/Freeze/EvictorI.cpp
+++ b/cpp/src/Freeze/EvictorI.cpp
@@ -129,7 +129,7 @@ Freeze::EvictorI::createObject(const Identity& ident, const ObjectPtr& servant)
//
// Save the new Ice Object to the database.
//
- _dict[ident] = servant;
+ _dict.insert(make_pair(ident, servant));
add(ident, servant);
if(_trace >= 1)
@@ -256,13 +256,9 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie)
// Load the Ice Object from database and add a
// Servant for it.
//
- ObjectPtr servant;
- try
- {
- servant = _dict[current.id];
- }
- catch(const DBNotFoundException&)
- {
+ IdentityObjectDict::iterator p = _dict.find(current.id);
+ if(p == _dict.end())
+ {
//
// The Ice Object with the given identity does not exist,
// client will get an ObjectNotExistException.
@@ -273,6 +269,7 @@ Freeze::EvictorI::locate(const Current& current, LocalObjectPtr& cookie)
//
// Add the new Servant to the evictor queue.
//
+ ObjectPtr servant = p->second;
element = add(current.id, servant);
//
@@ -332,7 +329,7 @@ Freeze::EvictorI::finished(const Current& current, const ObjectPtr& servant, con
{
if(current.mode != Nonmutating && !element->destroyed)
{
- _dict[current.id] = servant;
+ _dict.insert(make_pair(current.id, servant));
}
}
@@ -407,7 +404,7 @@ Freeze::EvictorI::evict()
//
if(_persistenceMode == SaveUponEviction)
{
- _dict[ident] = element->servant;
+ _dict.insert(make_pair(ident, element->servant));
}
//