diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-07-15 15:47:09 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-07-15 15:47:09 +0000 |
commit | bc02b784807e8d979acb3a628039eaf6b5aefb75 (patch) | |
tree | dc489510e9bc4c18e24c5459cc2a029e64688a75 /cppe/test/IceE/operations/Server.cpp | |
parent | add hello world client midlet (diff) | |
download | ice-bc02b784807e8d979acb3a628039eaf6b5aefb75.tar.bz2 ice-bc02b784807e8d979acb3a628039eaf6b5aefb75.tar.xz ice-bc02b784807e8d979acb3a628039eaf6b5aefb75.zip |
Updated README. Fixed MFC screen size. Fixed test suite screen size.
Started mods for using an optional configuration file.
Diffstat (limited to 'cppe/test/IceE/operations/Server.cpp')
-rw-r--r-- | cppe/test/IceE/operations/Server.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/cppe/test/IceE/operations/Server.cpp b/cppe/test/IceE/operations/Server.cpp index 1b70bb9d4c6..d1b70f0db7f 100644 --- a/cppe/test/IceE/operations/Server.cpp +++ b/cppe/test/IceE/operations/Server.cpp @@ -17,35 +17,36 @@ using namespace std; class OperationsTestApplication : public TestApplication { public: -
- OperationsTestApplication() :
- TestApplication("operations server")
- {
- }
+ + OperationsTestApplication() : + TestApplication("operations server") + { + } virtual int run(int argc, char* argv[]) - {
- Ice::PropertiesPtr properties = Ice::getDefaultProperties(argc, argv);
-
- properties->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000");
- properties->setProperty("CheckedCastAdapter.Endpoints", "default -p 12346 -t 10000");
- //properties->setProperty("IceE.Trace.Network", "5");
- //properties->setProperty("IceE.Trace.Protocol", "5");
+ { + Ice::PropertiesPtr properties = Ice::createProperties(); + + properties->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 10000"); + //properties->setProperty("IceE.Trace.Network", "5"); + //properties->setProperty("IceE.Trace.Protocol", "5"); - setCommunicator(Ice::initialize(argc, argv)); + try + { + properties->load("config"); + } + catch(const Ice::FileException&) + { + } + + setCommunicator(Ice::initializeWithProperties(argc, argv, properties)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new MyDerivedClassI(adapter, Ice::stringToIdentity("test")); adapter->add(object, Ice::stringToIdentity("test")); adapter->activate(); - // - // Make a separate adapter with a servant locator. We use this to test - // that ::Ice::Context is correctly passed to checkedCast() operation. - // - adapter = communicator()->createObjectAdapter("CheckedCastAdapter"); - adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif @@ -53,7 +54,7 @@ public: return EXIT_SUCCESS; } }; -
+ #ifdef _WIN32_WCE int WINAPI |