diff options
Diffstat (limited to 'cpp/test/Ice/adapterDeactivation/Server.cpp')
-rw-r--r-- | cpp/test/Ice/adapterDeactivation/Server.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cpp/test/Ice/adapterDeactivation/Server.cpp b/cpp/test/Ice/adapterDeactivation/Server.cpp new file mode 100644 index 00000000000..9ec51415399 --- /dev/null +++ b/cpp/test/Ice/adapterDeactivation/Server.cpp @@ -0,0 +1,42 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <ServantLocatorI.h> +#include <TestCommon.h> + +using namespace std; +using namespace Ice; + +class TestServer : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + TestServer app; + return app.main(argc, argv); +} + +int +TestServer::run(int argc, char* argv[]) +{ + communicator()->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12345 -t 2000"); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); + ServantLocatorPtr locator = new ServantLocatorI; + adapter->addServantLocator(locator, ""); + adapter->activate(); + adapter->waitForDeactivate(); + return EXIT_SUCCESS; +} |