summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/ComponentDeployer.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2002-08-09 14:46:06 +0000
committerBenoit Foucher <benoit@zeroc.com>2002-08-09 14:46:06 +0000
commitdb3b68cb56c951f2f54fd63685039ab908acab06 (patch)
treea2fc0e7e9fde3634b96f6da41b268fb1582b4f44 /cpp/src/IcePack/ComponentDeployer.cpp
parentadded dummy file (diff)
downloadice-db3b68cb56c951f2f54fd63685039ab908acab06.tar.bz2
ice-db3b68cb56c951f2f54fd63685039ab908acab06.tar.xz
ice-db3b68cb56c951f2f54fd63685039ab908acab06.zip
Added new IcePack test suite, add IcePack tracing properties, added IcePack
server shutdown.
Diffstat (limited to 'cpp/src/IcePack/ComponentDeployer.cpp')
-rw-r--r--cpp/src/IcePack/ComponentDeployer.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/cpp/src/IcePack/ComponentDeployer.cpp b/cpp/src/IcePack/ComponentDeployer.cpp
index 0a56a6d2e79..5461728cea2 100644
--- a/cpp/src/IcePack/ComponentDeployer.cpp
+++ b/cpp/src/IcePack/ComponentDeployer.cpp
@@ -488,20 +488,8 @@ IcePack::ComponentDeployer::ComponentDeployer(const Ice::CommunicatorPtr& commun
assert(!serversPath.empty());
_variables["datadir"] = serversPath + (serversPath[serversPath.length() - 1] == '/' ? "" : "/") + "servers";
- //
- // TODO: Find a better way to bootstrap the yellow service. We
- // need to set the locator on the proxy here, because the
- // communicator doesn't have a default locator since it's the
- // locator communicator...
- //
- Ice::ObjectPrx object =
- _communicator->stringToProxy(_communicator->getProperties()->getProperty("IcePack.Yellow.Admin"));
- if(object)
- {
- Ice::LocatorPrx locator = Ice::LocatorPrx::uncheckedCast(
- _communicator->stringToProxy(_communicator->getProperties()->getProperty("Ice.Default.Locator")));
- _yellowAdmin = Yellow::AdminPrx::uncheckedCast(object->ice_locator(locator));
- }
+ _yellowAdmin = Yellow::AdminPrx::uncheckedCast(
+ _communicator->stringToProxy(_communicator->getProperties()->getProperty("IcePack.Yellow.Admin")));
}
void
@@ -738,6 +726,23 @@ IcePack::ComponentDeployer::overrideBaseDir(const string& basedir)
}
//
+// Returns a path including the base directory if path is a relative
+// path.
+//
+string
+IcePack::ComponentDeployer::toLocation(const string& path) const
+{
+ if(path.empty())
+ {
+ return "";
+ }
+
+ map<string, string>::const_iterator p = _variables.find("basedir");
+ assert(p != _variables.end());
+ return path[0] != '/' ? p->second + "/" + path : path;
+}
+
+//
// Substitute variables with their values.
//
string