summaryrefslogtreecommitdiff
path: root/cppe/test/IceE/retry/Server.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-03-03 14:10:40 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-03-03 14:10:40 +0000
commite642c24a430dc350b3b14b5a925376084f8a7602 (patch)
treec494bf31e6c52a327e46a47e4fdf0e98872c6784 /cppe/test/IceE/retry/Server.cpp
parentFix (diff)
downloadice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.bz2
ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.xz
ice-e642c24a430dc350b3b14b5a925376084f8a7602.zip
Ported fix for bug 574 and retry test
Diffstat (limited to 'cppe/test/IceE/retry/Server.cpp')
-rw-r--r--cppe/test/IceE/retry/Server.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/cppe/test/IceE/retry/Server.cpp b/cppe/test/IceE/retry/Server.cpp
new file mode 100644
index 00000000000..660c9293660
--- /dev/null
+++ b/cppe/test/IceE/retry/Server.cpp
@@ -0,0 +1,70 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice-E is licensed to you under the terms described in the
+// ICEE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <IceE/IceE.h>
+#include <TestCommon.h>
+#include <TestApplication.h>
+#include <TestI.h>
+
+using namespace std;
+
+class RetryTestApplication : public TestApplication
+{
+public:
+
+ RetryTestApplication() :
+ TestApplication("retry server")
+ {
+ }
+
+ virtual int
+ run(int argc, char* argv[])
+ {
+ Ice::PropertiesPtr properties = Ice::createProperties();
+
+ properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
+ //properties->setProperty("Ice.Trace.Network", "5");
+ //properties->setProperty("Ice.Trace.Protocol", "5");
+
+ loadConfig(properties);
+ setCommunicator(Ice::initializeWithProperties(argc, argv, properties));
+
+ Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter");
+ Ice::ObjectPtr object = new RetryI;
+ adapter->add(object, Ice::stringToIdentity("retry"));
+ adapter->activate();
+
+#ifndef _WIN32_WCE
+ communicator()->waitForShutdown();
+#endif
+
+ return EXIT_SUCCESS;
+ }
+};
+
+#ifdef _WIN32_WCE
+
+int WINAPI
+WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
+{
+ RetryTestApplication app;
+ return app.main(hInstance);
+}
+
+#else
+
+int
+main(int argc, char** argv)
+{
+ RetryTestApplication app;
+ return app.main(argc, argv);
+}
+
+#endif
+