summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-27 22:41:27 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-27 22:41:27 +0000
commit36eea2d8893de0ef19887c7feb8814b74beece0f (patch)
tree55d4ec453a4e00a9a5b6d42c2850f1c9d8d9efc5 /cpp/src
parentmore collocation stuff (diff)
downloadice-36eea2d8893de0ef19887c7feb8814b74beece0f.tar.bz2
ice-36eea2d8893de0ef19887c7feb8814b74beece0f.tar.xz
ice-36eea2d8893de0ef19887c7feb8814b74beece0f.zip
collocated evictor demo
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Direct.cpp24
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp10
2 files changed, 11 insertions, 23 deletions
diff --git a/cpp/src/Ice/Direct.cpp b/cpp/src/Ice/Direct.cpp
index f88987a7d45..59a57e1a4d0 100644
--- a/cpp/src/Ice/Direct.cpp
+++ b/cpp/src/Ice/Direct.cpp
@@ -35,21 +35,8 @@ IceInternal::Direct::Direct(const ObjectAdapterPtr& adapter, const ReferencePtr&
_servant = _locator->locate(_adapter, _reference->identity, _operation, _cookie);
}
}
-
- if(!_servant)
- {
- throw ObjectNotExistException(__FILE__, __LINE__);
- }
- }
- catch(const LocationForward&)
- {
- if (_locator && _servant)
- {
- _locator->finished(_adapter, _reference->identity, _servant, _operation, _cookie);
- }
- throw;
}
- catch(const LocalException&)
+ catch(...)
{
if (_locator && _servant)
{
@@ -57,13 +44,10 @@ IceInternal::Direct::Direct(const ObjectAdapterPtr& adapter, const ReferencePtr&
}
throw;
}
- catch(...)
+
+ if(!_servant)
{
- if (_locator && _servant)
- {
- _locator->finished(_adapter, _reference->identity, _servant, _operation, _cookie);
- }
- throw UnknownException(__FILE__, __LINE__);
+ throw ObjectNotExistException(__FILE__, __LINE__);
}
}
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index a889541b3e6..0790e49de34 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -67,7 +67,7 @@ Ice::ObjectAdapterI::hold()
}
for_each(_collectorFactories.begin(), _collectorFactories.end(),
- ::IceInternal::voidMemFun(& CollectorFactory::hold));
+ ::IceInternal::voidMemFun(&CollectorFactory::hold));
}
void
@@ -77,11 +77,15 @@ Ice::ObjectAdapterI::deactivate()
if (_collectorFactories.empty())
{
- throw ObjectAdapterDeactivatedException(__FILE__, __LINE__);
+ //
+ // Ignore deactivation requests if the Object Adapter has
+ // already been deactivated.
+ //
+ return;
}
for_each(_collectorFactories.begin(), _collectorFactories.end(),
- ::IceInternal::voidMemFun(& CollectorFactory::destroy));
+ ::IceInternal::voidMemFun(&CollectorFactory::destroy));
_collectorFactories.clear();
_activeServantMap.clear();
_activeServantMapHint = _activeServantMap.begin();