summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/ServerI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2008-01-10 15:42:06 +0100
committerBenoit Foucher <benoit@zeroc.com>2008-01-10 15:42:06 +0100
commit5fffe43155bf1d4f74116cbc9a7fc52cf3868159 (patch)
treeb9e0f02997a91ffa853aab7c4f9c169798b46f0b /cpp/src/IceGrid/ServerI.cpp
parentSome more changes wrt use of mcpp (diff)
downloadice-5fffe43155bf1d4f74116cbc9a7fc52cf3868159.tar.bz2
ice-5fffe43155bf1d4f74116cbc9a7fc52cf3868159.tar.xz
ice-5fffe43155bf1d4f74116cbc9a7fc52cf3868159.zip
Fixed bug 2629
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r--cpp/src/IceGrid/ServerI.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index 7132944a443..d4eacad1224 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -910,6 +910,13 @@ ServerI::getDistribution() const
return _desc ? _desc->distrib : InternalDistributionDescriptorPtr();
}
+bool
+ServerI::dependsOnApplicationDistrib() const
+{
+ Lock sync(*this);
+ return _desc ? _desc->applicationDistrib : false;
+}
+
void
ServerI::start(ServerActivation activation, const AMD_Server_startPtr& amdCB)
{
@@ -1521,7 +1528,7 @@ ServerI::destroy()
adpts = _adapters;
}
- _node->removeServer(this, _desc->application, _desc->applicationDistrib);
+ _node->removeServer(this, _desc->application);
try
{
@@ -1695,13 +1702,20 @@ ServerI::update()
{
throw DeploymentException(msg);
}
-
+
if(oldDescriptor)
{
- _node->removeServer(this, oldDescriptor->application, oldDescriptor->applicationDistrib);
+ if(oldDescriptor->application != _desc->application)
+ {
+ _node->removeServer(this, oldDescriptor->application);
+ _node->addServer(this, _desc->application);
+ }
}
- _node->addServer(this, _desc->application, _desc->applicationDistrib);
-
+ else
+ {
+ _node->addServer(this, _desc->application);
+ }
+
AdapterPrxDict adapters;
for(ServerAdapterDict::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p)
{