summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-06-17 22:59:26 +0000
committerMichi Henning <michi@zeroc.com>2003-06-17 22:59:26 +0000
commitdc7883987268ddf6c9429bfa2ab9d6eabfd1d3d0 (patch)
tree46655692041a442ae6a4512980fafead8781e666 /cpp
parentminor edits (diff)
downloadice-dc7883987268ddf6c9429bfa2ab9d6eabfd1d3d0.tar.bz2
ice-dc7883987268ddf6c9429bfa2ab9d6eabfd1d3d0.tar.xz
ice-dc7883987268ddf6c9429bfa2ab9d6eabfd1d3d0.zip
Removed removeServantLocator() from ObjectAdapter.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/CHANGES4
-rw-r--r--cpp/slice/Ice/LocalException.ice8
-rw-r--r--cpp/slice/Ice/ObjectAdapter.ice20
-rw-r--r--cpp/slice/Ice/ServantLocator.ice1
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp10
-rw-r--r--cpp/src/Ice/ObjectAdapterI.h1
-rw-r--r--cpp/src/Ice/ServantManager.cpp28
-rw-r--r--cpp/src/Ice/ServantManager.h1
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp12
9 files changed, 8 insertions, 77 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES
index 8185d23a647..739f1fed8d1 100644
--- a/cpp/CHANGES
+++ b/cpp/CHANGES
@@ -1,6 +1,10 @@
Changes since version 1.1.0
---------------------------
+- ObjectAdapter::removeServantLocator() no longer exists.
+ The life cycle of servant locators that are registered
+ with an object adapter ends when the adapter is destroyed.
+
- Changed Ice::ServantLocator::deactivate to be passed the category for
which a servant locator is being deactivated.
diff --git a/cpp/slice/Ice/LocalException.ice b/cpp/slice/Ice/LocalException.ice
index 42f91c23895..2823724956c 100644
--- a/cpp/slice/Ice/LocalException.ice
+++ b/cpp/slice/Ice/LocalException.ice
@@ -743,8 +743,8 @@ local exception AlreadyRegisteredException
/**
*
* This exception is raised if an attempt is made to remove a servant,
- * servant locator, facet, object factory, plug-in, object adapter,
- * object, or user exception factory that is not currently registered.
+ * facet, object factory, plug-in, object adapter, object, or user
+ * exception factory that is not currently registered.
*
**/
local exception NotRegisteredException
@@ -752,8 +752,8 @@ local exception NotRegisteredException
/**
*
* The kind of object that could not be removed: "servant",
- * "servant locator", "facet", "object factory", "plug-in",
- * "object adapter", "object", or "user exception factory".
+ * "facet", "object factory", "plug-in", "object adapter",
+ * "object", or "user exception factory".
*
**/
string kindOfObject;
diff --git a/cpp/slice/Ice/ObjectAdapter.ice b/cpp/slice/Ice/ObjectAdapter.ice
index 5d9b91983af..3f6f92a8164 100644
--- a/cpp/slice/Ice/ObjectAdapter.ice
+++ b/cpp/slice/Ice/ObjectAdapter.ice
@@ -239,7 +239,6 @@ local interface ObjectAdapter
* not belong to any specific category.
*
* @see Identity
- * @see removeServantLocator
* @see findServantLocator
* @see ServantLocator
*
@@ -248,24 +247,6 @@ local interface ObjectAdapter
/**
*
- * Remove a Servant Locator from this object adapter. Removing
- * a category for which no servant locator is registered throws
- * [NotRegisteredException].
- *
- * @param category The category for which the Servant Locator can
- * locate Servants, or an empty string if the Servant Locator does
- * not belong to any specific category.
- *
- * @see Identity
- * @see addServantLocator
- * @see findServantLocator
- * @see ServantLocator
- *
- **/
- void removeServantLocator(string category);
-
- /**
- *
* Find a Servant Locator installed with this object adapter.
*
* @param category The category for which the Servant Locator can
@@ -277,7 +258,6 @@ local interface ObjectAdapter
*
* @see Identity
* @see addServantLocator
- * @see removeServantLocator
* @see ServantLocator
*
**/
diff --git a/cpp/slice/Ice/ServantLocator.ice b/cpp/slice/Ice/ServantLocator.ice
index a3d6bf8ee18..6e743f09875 100644
--- a/cpp/slice/Ice/ServantLocator.ice
+++ b/cpp/slice/Ice/ServantLocator.ice
@@ -28,7 +28,6 @@ module Ice
*
* @see ObjectAdapter
* @see ObjectAdapter::addServantLocator
- * @see ObjectAdapter::removeServantLocator
* @see ObjectAdapter::findServantLocator
*
**/
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index f96d57b72af..e5b3ea46093 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -278,16 +278,6 @@ Ice::ObjectAdapterI::addServantLocator(const ServantLocatorPtr& locator, const s
_servantManager->addServantLocator(locator, prefix);
}
-void
-Ice::ObjectAdapterI::removeServantLocator(const string& prefix)
-{
- IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
-
- checkForDeactivation();
-
- _servantManager->removeServantLocator(prefix);
-}
-
ServantLocatorPtr
Ice::ObjectAdapterI::findServantLocator(const string& prefix)
{
diff --git a/cpp/src/Ice/ObjectAdapterI.h b/cpp/src/Ice/ObjectAdapterI.h
index db7ca6b4fdd..81564d486aa 100644
--- a/cpp/src/Ice/ObjectAdapterI.h
+++ b/cpp/src/Ice/ObjectAdapterI.h
@@ -57,7 +57,6 @@ public:
virtual void remove(const Identity&);
virtual void addServantLocator(const ServantLocatorPtr&, const std::string&);
- virtual void removeServantLocator(const std::string&);
virtual ServantLocatorPtr findServantLocator(const std::string&);
virtual ObjectPtr identityToServant(const Identity&);
diff --git a/cpp/src/Ice/ServantManager.cpp b/cpp/src/Ice/ServantManager.cpp
index 5dbc853abe9..e5f187a55d7 100644
--- a/cpp/src/Ice/ServantManager.cpp
+++ b/cpp/src/Ice/ServantManager.cpp
@@ -109,34 +109,6 @@ IceInternal::ServantManager::addServantLocator(const ServantLocatorPtr& locator,
_locatorMapHint = _locatorMap.insert(_locatorMapHint, pair<const string, ServantLocatorPtr>(prefix, locator));
}
-void
-IceInternal::ServantManager::removeServantLocator(const string& prefix)
-{
- ServantLocatorPtr locator;
-
- {
- IceUtil::Mutex::Lock sync(*this);
-
- assert(_instance); // Must not be called after destruction.
-
- map<string, ServantLocatorPtr>::iterator p = _locatorMap.find(prefix);
- if(p == _locatorMap.end())
- {
- NotRegisteredException ex(__FILE__, __LINE__);
- ex.kindOfObject = "servant locator";
- ex.id = prefix;
- throw ex;
- }
-
- locator = p->second;
-
- _locatorMap.erase(p);
- _locatorMapHint = _locatorMap.end();
- }
-
- locator->deactivate(prefix);
-}
-
ServantLocatorPtr
IceInternal::ServantManager::findServantLocator(const string& prefix) const
{
diff --git a/cpp/src/Ice/ServantManager.h b/cpp/src/Ice/ServantManager.h
index 678c0813230..b327be7f8b6 100644
--- a/cpp/src/Ice/ServantManager.h
+++ b/cpp/src/Ice/ServantManager.h
@@ -41,7 +41,6 @@ public:
Ice::ObjectPtr findServant(const Ice::Identity&) const;
void addServantLocator(const Ice::ServantLocatorPtr& locator, const std::string&);
- void removeServantLocator(const std::string&);
Ice::ServantLocatorPtr findServantLocator(const std::string&) const;
private:
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index ba11bd18de5..3f04bc5e879 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -605,18 +605,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
}
test(gotException);
- gotException = false;
- adapter->removeServantLocator("x");
- try
- {
- adapter->removeServantLocator("x");
- }
- catch(const Ice::NotRegisteredException&)
- {
- gotException = true;
- }
- test(gotException);
-
adapter->deactivate();
}
cout << "ok" << endl;