diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-01-31 14:56:01 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-01-31 14:56:01 +0000 |
commit | cf12c661398f7ec68eb060a679ede5c5eaa8f407 (patch) | |
tree | 31abe4060186b539970f789d83db1a285ae9eadc /cpp/demo/IceGrid/replication | |
parent | Added EventLoggerMsg.res to link (diff) | |
download | ice-cf12c661398f7ec68eb060a679ede5c5eaa8f407.tar.bz2 ice-cf12c661398f7ec68eb060a679ede5c5eaa8f407.tar.xz ice-cf12c661398f7ec68eb060a679ede5c5eaa8f407.zip |
Added replication demo.
Diffstat (limited to 'cpp/demo/IceGrid/replication')
22 files changed, 832 insertions, 0 deletions
diff --git a/cpp/demo/IceGrid/replication/Client.cpp b/cpp/demo/IceGrid/replication/Client.cpp new file mode 100644 index 00000000000..1fc5d816c5d --- /dev/null +++ b/cpp/demo/IceGrid/replication/Client.cpp @@ -0,0 +1,106 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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 <IceUtil/Thread.h> +#include <IceGrid/Query.h> +#include <Hello.h> + +using namespace std; +using namespace Demo; + +class HelloClient : public Ice::Application +{ +public: + + virtual int run(int, char*[]); + virtual void interruptCallback(int); + +private: + + void menu(); +}; + +int +main(int argc, char* argv[]) +{ + HelloClient app; + return app.main(argc, argv, "config.client"); +} + +int +HelloClient::run(int argc, char* argv[]) +{ + // + // Since this is an interactive demo we want the custom interrupt + // callback to be called when the process is interrupted. + // + callbackOnInterrupt(); + + // + // Get the hello proxy. We configure the proxy to not cache the + // server connection with the proxy and to disable the locator + // cache. With this configuration, the IceGrid locator will be + // queried for each invocation on the proxy and the invocation + // will be sent over the server connection matching the returned + // endpoints. + // + Ice::ObjectPrx obj = communicator()->stringToProxy("hello"); + obj = obj->ice_connectionCached(false); + obj = obj->ice_locatorCacheTimeout(0); + + HelloPrx hello = HelloPrx::checkedCast(obj); + if(!hello) + { + cerr << argv[0] << ": couldn't find a `::Demo::Hello' object." << endl; + return EXIT_FAILURE; + } + + string s; + do + { + cout << "enter the number of iterations: "; + cin >> s; + int count = atoi(s.c_str()); + cout << "enter the delay between each greetings (in ms): "; + cin >> s; + int delay = atoi(s.c_str()); + if(delay < 0) + { + delay = 500; // 500 milli-seconds + } + + for(int i = 0; i < count; i++) + { + cout << hello->getGreeting() << endl; + IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(delay)); + } + } + while(cin.good() && s != "x"); + + return EXIT_SUCCESS; +} + +void +HelloClient::interruptCallback(int) +{ + try + { + communicator()->destroy(); + } + catch(const IceUtil::Exception& ex) + { + cerr << appName() << ": " << ex << endl; + } + catch(...) + { + cerr << appName() << ": unknown exception" << endl; + } + exit(EXIT_SUCCESS); +} diff --git a/cpp/demo/IceGrid/replication/Hello.ice b/cpp/demo/IceGrid/replication/Hello.ice new file mode 100644 index 00000000000..bf72d107ca9 --- /dev/null +++ b/cpp/demo/IceGrid/replication/Hello.ice @@ -0,0 +1,24 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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. +// +// ********************************************************************** + +#ifndef HELLO_ICE +#define HELLO_ICE + +module Demo +{ + +interface Hello +{ + ["cpp:const"] idempotent string getGreeting(); + idempotent void shutdown(); +}; + +}; + +#endif diff --git a/cpp/demo/IceGrid/replication/HelloI.cpp b/cpp/demo/IceGrid/replication/HelloI.cpp new file mode 100644 index 00000000000..e7af2a1986c --- /dev/null +++ b/cpp/demo/IceGrid/replication/HelloI.cpp @@ -0,0 +1,30 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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 <HelloI.h> + +using namespace std; + +HelloI::HelloI(const string& name) : _name(name) +{ +} + +std::string +HelloI::getGreeting(const Ice::Current&) const +{ + return _name + " says Hello World!"; +} + +void +HelloI::shutdown(const Ice::Current& c) +{ + cout << _name << " shutting down..." << endl; + c.adapter->getCommunicator()->shutdown(); +} diff --git a/cpp/demo/IceGrid/replication/HelloI.h b/cpp/demo/IceGrid/replication/HelloI.h new file mode 100644 index 00000000000..a53da41613b --- /dev/null +++ b/cpp/demo/IceGrid/replication/HelloI.h @@ -0,0 +1,29 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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. +// +// ********************************************************************** + +#ifndef HELLO_I_H +#define HELLO_I_H + +#include <Hello.h> + +class HelloI : public Demo::Hello +{ +public: + + HelloI(const std::string&); + + virtual std::string getGreeting(const Ice::Current&) const; + virtual void shutdown(const Ice::Current&); + +private: + + const std::string _name; +}; + +#endif diff --git a/cpp/demo/IceGrid/replication/Makefile b/cpp/demo/IceGrid/replication/Makefile new file mode 100644 index 00000000000..be4a6fd4dc6 --- /dev/null +++ b/cpp/demo/IceGrid/replication/Makefile @@ -0,0 +1,43 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2007 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. +# +# ********************************************************************** + +top_srcdir = ../../.. + +CLIENT = client +SERVER = server + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.o + +COBJS = Client.o + +SOBJS = HelloI.o \ + Server.o + +SRCS = $(OBJS:.o=.cpp) \ + $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) \ + +SLICE_SRCS = Hello.ice + +include $(top_srcdir)/config/Make.rules + +CPPFLAGS := -I. $(CPPFLAGS) +LINKWITH := $(BZIP2_RPATH_LINK) -lIce -lIceUtil + +$(CLIENT): $(OBJS) $(COBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lIceGrid -lGlacier2 $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) + +include .depend diff --git a/cpp/demo/IceGrid/replication/Makefile.mak b/cpp/demo/IceGrid/replication/Makefile.mak new file mode 100644 index 00000000000..d92ed9f84a0 --- /dev/null +++ b/cpp/demo/IceGrid/replication/Makefile.mak @@ -0,0 +1,47 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2007 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. +# +# ********************************************************************** + +top_srcdir = ..\..\.. + +CLIENT = client.exe +SERVER = server.exe + +TARGETS = $(CLIENT) $(SERVER) + +OBJS = Hello.obj + +COBJS = Client.obj + +SOBJS = HelloI.obj \ + Server.obj + +SRCS = $(OBJS:.obj=.cpp) \ + $(COBJS:.obj=.cpp) \ + $(SOBJS:.obj=.cpp) + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN + +!if "$(CPP_COMPILER)" != "BCC2006" & "$(OPTIMIZE)" != "yes" +CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) +SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) +!endif + +$(CLIENT): $(OBJS) $(COBJS) + $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) \ + icegrid$(LIBSUFFIX).lib glacier2$(LIBSUFFIX).lib + +$(SERVER): $(OBJS) $(SOBJS) + $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) + +clean:: + del /q Hello.cpp Hello.h + +!include .depend diff --git a/cpp/demo/IceGrid/replication/README b/cpp/demo/IceGrid/replication/README new file mode 100644 index 00000000000..98c73978570 --- /dev/null +++ b/cpp/demo/IceGrid/replication/README @@ -0,0 +1,33 @@ +To run the demo, start the IceGrid registries and nodes (you can start +the registries and nodes in any order, you can also start one or two +registries and start more later): + +$ icegridregistry --Ice.Config=config.master +$ icegridregistry --Ice.Config=config.replica1 +$ icegridregistry --Ice.Config=config.replica2 +$ icegridregistry --Ice.Config=config.node1 +$ icegridregistry --Ice.Config=config.node2 + +In a separate window: + +$ icegridadmin --Ice.Config=config.client -e \ + "application add 'application.xml'" +$ client + +This will deploy the application described in the file +"application.xml" and start the client. + +The client invokes the number of specified iterations with a given +delay on a well-known proxy configured to use per-request load +balancing. Each invocation queries the IceGrid registry locator to +retrieve the endpoints of the object (you can set Ice.Trace.Location=1 +to see the locator invocations). + +While the client is running and invoking on the server, you can try to +shutdown some of the registries with the `registry shutdown' +icegridadmin command or from the IceGridAdmin GUI. You can of course +also try to kill them. As long as one IceGrid registry is still +running, the client will continue to work. + +Similarly, you can shutdown or kill one of the the server or IceGrid +node, the client will continue to work. diff --git a/cpp/demo/IceGrid/replication/Server.cpp b/cpp/demo/IceGrid/replication/Server.cpp new file mode 100644 index 00000000000..c28d440de70 --- /dev/null +++ b/cpp/demo/IceGrid/replication/Server.cpp @@ -0,0 +1,41 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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 <HelloI.h> + +using namespace std; + +class Server : public Ice::Application +{ +public: + + virtual int run(int argc, char* argv[]); + +}; + +int +main(int argc, char* argv[]) +{ + Server app; + int status = app.main(argc, argv); + return status; +} + +int +Server::run(int argc, char* argv[]) +{ + Ice::PropertiesPtr properties = communicator()->getProperties(); + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello"); + Ice::Identity id = communicator()->stringToIdentity(properties->getProperty("Identity")); + adapter->add(new HelloI(properties->getProperty("Ice.ServerId")), id); + adapter->activate(); + communicator()->waitForShutdown(); + return EXIT_SUCCESS; +} diff --git a/cpp/demo/IceGrid/replication/application.xml b/cpp/demo/IceGrid/replication/application.xml new file mode 100644 index 00000000000..8ec77bbbc86 --- /dev/null +++ b/cpp/demo/IceGrid/replication/application.xml @@ -0,0 +1,39 @@ +<!-- + ********************************************************************** + + Copyright (c) 2003-2005 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. + + ********************************************************************** +--> + +<icegrid> + <application name="Simple"> + + <server-template id="SimpleServer"> + <parameter name="index"/> + <server id="SimpleServer-${index}" exe="./server" activation="on-demand"> + <adapter name="Hello" endpoints="tcp" register-process="true" replica-group="ReplicatedHelloAdapter"/> + <property name="Identity" value="hello"/> + </server> + </server-template> + + <replica-group id="ReplicatedHelloAdapter"> + <load-balancing type="random" n-replicas="2"/> + <object identity="hello" type="::Demo::Hello"/> + </replica-group> + + <node name="node1"> + <server-instance template="SimpleServer" index="1"/> + <server-instance template="SimpleServer" index="2"/> + </node> + <node name="node2"> + <server-instance template="SimpleServer" index="3"/> + <server-instance template="SimpleServer" index="4"/> + </node> + + </application> + +</icegrid> diff --git a/cpp/demo/IceGrid/replication/config.client b/cpp/demo/IceGrid/replication/config.client new file mode 100644 index 00000000000..4060f29ec7e --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.client @@ -0,0 +1,19 @@ +# +# The IceGrid locator proxy. +# +Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000:default -p 12001:default -p 12002 + +Ice.Override.Timeout=10000 + +# +# Trace properties. +# +Ice.Trace.Network=1 +#Ice.Trace.Location=1 + +# +# IceGrid admin properties to allow running IceGrid admin clients. +# +IceGridAdmin.Username=benoit +IceGridAdmin.Password=dummy + diff --git a/cpp/demo/IceGrid/replication/config.master b/cpp/demo/IceGrid/replication/config.master new file mode 100644 index 00000000000..08471143e9e --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.master @@ -0,0 +1,21 @@ +IceGrid.InstanceName=DemoIceGrid + +# +# IceGrid registry configuration. +# +Ice.OA.IceGrid.Registry.Client.Endpoints=default -p 12000 -t 10000 +Ice.OA.IceGrid.Registry.Server.Endpoints=default -t 10000 +Ice.OA.IceGrid.Registry.Internal.Endpoints=default -t 10000 +IceGrid.Registry.Data=db/master +IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier +IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier + +Ice.StdErr=db/master/stderr.txt +Ice.StdOut=db/master/stdout.txt + +# +# Trace properties. +# +Ice.ProgramName=Master +IceGrid.Registry.Trace.Node=2 +IceGrid.Registry.Trace.Replica=2 diff --git a/cpp/demo/IceGrid/replication/config.node1 b/cpp/demo/IceGrid/replication/config.node1 new file mode 100644 index 00000000000..f9b805d0ed8 --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.node1 @@ -0,0 +1,17 @@ +Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000 -t 10000:default -p 12001 -t 10000:default -p 12002 -t 10000 + +# +# IceGrid node configuration. +# +IceGrid.Node.Name=node1 +Ice.OA.IceGrid.Node.Endpoints=default -t 10000 +IceGrid.Node.Data=db/node1 + +Ice.StdErr=db/node1/stderr.txt +Ice.StdOut=db/node1/stdout.txt + +# +# Trace properties. +# +Ice.ProgramName=Node1 +IceGrid.Node.Trace.Replica=2 diff --git a/cpp/demo/IceGrid/replication/config.node2 b/cpp/demo/IceGrid/replication/config.node2 new file mode 100644 index 00000000000..26a9e595af1 --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.node2 @@ -0,0 +1,17 @@ +Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000 -t 10000:default -p 12001 -t 10000:default -p 12002 -t 10000 + +# +# IceGrid node configuration. +# +IceGrid.Node.Name=node2 +Ice.OA.IceGrid.Node.Endpoints=default -t 10000 +IceGrid.Node.Data=db/node2 + +Ice.StdErr=db/node2/stderr.txt +Ice.StdOut=db/node2/stdout.txt + +# +# Trace properties. +# +Ice.ProgramName=Node2 +IceGrid.Node.Trace.Replica=2 diff --git a/cpp/demo/IceGrid/replication/config.replica1 b/cpp/demo/IceGrid/replication/config.replica1 new file mode 100644 index 00000000000..8df5cb75bcd --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.replica1 @@ -0,0 +1,22 @@ +Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000 -t 10000:default -p 12002 -t 10000 + +# +# IceGrid registry configuration. +# +Ice.OA.IceGrid.Registry.Client.Endpoints=default -p 12001 -t 10000 +Ice.OA.IceGrid.Registry.Server.Endpoints=default -t 10000 +Ice.OA.IceGrid.Registry.Internal.Endpoints=default -t 10000 +IceGrid.Registry.Data=db/replica1 +IceGrid.Registry.ReplicaName=Replica1 +IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier +IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier + +Ice.StdErr=db/replica1/stderr.txt +Ice.StdOut=db/replica1/stdout.txt + +# +# Trace properties. +# +Ice.ProgramName=Replica1 +IceGrid.Registry.Trace.Node=2 +IceGrid.Registry.Trace.Replica=2 diff --git a/cpp/demo/IceGrid/replication/config.replica2 b/cpp/demo/IceGrid/replication/config.replica2 new file mode 100644 index 00000000000..732fa32d785 --- /dev/null +++ b/cpp/demo/IceGrid/replication/config.replica2 @@ -0,0 +1,22 @@ +Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000 -t 10000:default -p 12001 -t 10000 + +# +# IceGrid registry configuration. +# +Ice.OA.IceGrid.Registry.Client.Endpoints=default -p 12002 -t 10000 +Ice.OA.IceGrid.Registry.Server.Endpoints=default -t 10000 +Ice.OA.IceGrid.Registry.Internal.Endpoints=default -t 10000 +IceGrid.Registry.Data=db/replica2 +IceGrid.Registry.ReplicaName=Replica2 +IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier +IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier + +Ice.StdErr=db/replica2/stderr.txt +Ice.StdOut=db/replica2/stdout.txt + +# +# Trace properties. +# +Ice.ProgramName=Replica2 +IceGrid.Registry.Trace.Node=2 +IceGrid.Registry.Trace.Replica=2 diff --git a/cpp/demo/IceGrid/replication/db/master/.dummy b/cpp/demo/IceGrid/replication/db/master/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/demo/IceGrid/replication/db/master/.dummy diff --git a/cpp/demo/IceGrid/replication/db/node1/.dummy b/cpp/demo/IceGrid/replication/db/node1/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/demo/IceGrid/replication/db/node1/.dummy diff --git a/cpp/demo/IceGrid/replication/db/node2/.dummy b/cpp/demo/IceGrid/replication/db/node2/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/demo/IceGrid/replication/db/node2/.dummy diff --git a/cpp/demo/IceGrid/replication/db/replica1/.dummy b/cpp/demo/IceGrid/replication/db/replica1/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/demo/IceGrid/replication/db/replica1/.dummy diff --git a/cpp/demo/IceGrid/replication/db/replica2/.dummy b/cpp/demo/IceGrid/replication/db/replica2/.dummy new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/cpp/demo/IceGrid/replication/db/replica2/.dummy diff --git a/cpp/demo/IceGrid/replication/replicationC.dsp b/cpp/demo/IceGrid/replication/replicationC.dsp new file mode 100755 index 00000000000..f8784b7dbb6 --- /dev/null +++ b/cpp/demo/IceGrid/replication/replicationC.dsp @@ -0,0 +1,157 @@ +# Microsoft Developer Studio Project File - Name="replicationC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=replicationC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "replicationC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "replicationC.mak" CFG="replicationC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "replicationC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "replicationC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "replicationC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Ice.lib IceUtil.lib IceGrid.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"client.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "replicationC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iced.lib IceUtild.lib IceGridd.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "replicationC - Win32 Release"
+# Name "replicationC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Hello.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Hello.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Hello.ice
+
+!IF "$(CFG)" == "replicationC - Win32 Release"
+
+USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Hello.ice
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "replicationC - Win32 Debug"
+
+USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Hello.ice
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Target
+# End Project
diff --git a/cpp/demo/IceGrid/replication/replicationS.dsp b/cpp/demo/IceGrid/replication/replicationS.dsp new file mode 100755 index 00000000000..fe834948f35 --- /dev/null +++ b/cpp/demo/IceGrid/replication/replicationS.dsp @@ -0,0 +1,165 @@ +# Microsoft Developer Studio Project File - Name="replicationS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=replicationS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "replicationS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "replicationS.mak" CFG="replicationS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "replicationS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "replicationS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "replicationS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Ice.lib IceUtil.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"server.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "replicationS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../../include/stlport" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "replicationS - Win32 Release"
+# Name "replicationS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Hello.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelloI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Hello.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\HelloI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Hello.ice
+
+!IF "$(CFG)" == "replicationS - Win32 Release"
+
+USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Hello.ice
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "replicationS - Win32 Debug"
+
+USERDEP__HELLO="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
+# Begin Custom Build
+InputPath=.\Hello.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe Hello.ice
+
+"Hello.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Hello.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Target
+# End Project
|