diff options
author | Michael Dorner <michael.dorner@hotmail.de> | 2018-04-30 16:35:54 +0200 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2018-04-30 10:37:26 -0400 |
commit | 5c69b0009c8e95fa3905036c9eab7476aa7255c4 (patch) | |
tree | 3cf0e60495b5f7da1080363ddf2461c923de2d93 /cpp/src/IceGrid/Client.cpp | |
parent | Fixed Android APK path and multiple runs of the controller (diff) | |
download | ice-5c69b0009c8e95fa3905036c9eab7476aa7255c4.tar.bz2 ice-5c69b0009c8e95fa3905036c9eab7476aa7255c4.tar.xz ice-5c69b0009c8e95fa3905036c9eab7476aa7255c4.zip |
Allow FileParser.Endpoints to be set via Ice::Properties (#58)
* Register FileParser on IceGridAdmin.Server adapter, used with --server option
Diffstat (limited to 'cpp/src/IceGrid/Client.cpp')
-rw-r--r-- | cpp/src/IceGrid/Client.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/Client.cpp b/cpp/src/IceGrid/Client.cpp index 4704026deb3..9c36fdc6c7c 100644 --- a/cpp/src/IceGrid/Client.cpp +++ b/cpp/src/IceGrid/Client.cpp @@ -241,8 +241,10 @@ Client::main(StringSeq& args) try { _appName = args[0]; + PropertiesPtr defaultProps = createProperties(); + defaultProps->setProperty("IceGridAdmin.Server.Endpoints", "tcp -h localhost"); InitializationData id; - id.properties = createProperties(args); + id.properties = createProperties(args, defaultProps); id.properties->setProperty("Ice.Warn.Endpoints", "0"); _communicator = initialize(id); @@ -372,7 +374,7 @@ Client::run(StringSeq& originalArgs) if(opts.isSet("server")) { ObjectAdapterPtr adapter = - communicator()->createObjectAdapterWithEndpoints("FileParser", "tcp -h localhost"); + communicator()->createObjectAdapter("IceGridAdmin.Server"); adapter->activate(); ObjectPrx proxy = adapter->add(new FileParserI, stringToIdentity("FileParser")); consoleOut << proxy << endl; |