summaryrefslogtreecommitdiff
path: root/cpp/test/IceGrid/replicaGroup/Service.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-10-11 07:50:31 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-10-11 07:50:31 +0000
commit8e9b12de541e2a641c7e450df16e5a78bef20ec1 (patch)
tree66236a42905eec0c913479ba406f6688fd879e05 /cpp/test/IceGrid/replicaGroup/Service.cpp
parentfile policy.3.1.iceboxcs was initially added on branch R3_1_branch. (diff)
downloadice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.tar.bz2
ice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.tar.xz
ice-8e9b12de541e2a641c7e450df16e5a78bef20ec1.zip
Bug fixes, replication test.
Diffstat (limited to 'cpp/test/IceGrid/replicaGroup/Service.cpp')
-rw-r--r--cpp/test/IceGrid/replicaGroup/Service.cpp74
1 files changed, 74 insertions, 0 deletions
diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp
new file mode 100644
index 00000000000..cca1dda551c
--- /dev/null
+++ b/cpp/test/IceGrid/replicaGroup/Service.cpp
@@ -0,0 +1,74 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceBox/IceBox.h>
+#include <TestI.h>
+
+#ifndef TEST_SERVICE_API
+# define TEST_SERVICE_API ICE_DECLSPEC_EXPORT
+#endif
+
+
+using namespace std;
+using namespace Ice;
+
+class TEST_SERVICE_API ServiceI : public ::IceBox::Service
+{
+public:
+
+ ServiceI();
+ virtual ~ServiceI();
+
+ virtual void start(const string&,
+ const CommunicatorPtr&,
+ const StringSeq&);
+
+ virtual void stop();
+};
+
+extern "C"
+{
+
+//
+// Factory function
+//
+TEST_SERVICE_API ::IceBox::Service*
+create(CommunicatorPtr communicator)
+{
+ return new ServiceI;
+}
+
+}
+
+ServiceI::ServiceI()
+{
+}
+
+ServiceI::~ServiceI()
+{
+}
+
+void
+ServiceI::start(const string& name,
+ const CommunicatorPtr& communicator,
+ const StringSeq& args)
+{
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name);
+ Ice::ObjectPtr object = new TestI(adapter, communicator->getProperties());
+ adapter->add(object, communicator->stringToIdentity(name));
+ adapter->add(object, communicator->stringToIdentity(communicator->getProperties()->getProperty("Identity")));
+ adapter->activate();
+}
+
+void
+ServiceI::stop()
+{
+}
+