summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-25 13:45:13 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-25 13:45:13 +0000
commitdb693e3cf4413690e5898d16b8651cf36b64a5bc (patch)
treea16dad9beb7811d225bd13b53356bc88af341cef
parentAdded IceGrid aloocate demo (diff)
downloadice-db693e3cf4413690e5898d16b8651cf36b64a5bc.tar.bz2
ice-db693e3cf4413690e5898d16b8651cf36b64a5bc.tar.xz
ice-db693e3cf4413690e5898d16b8651cf36b64a5bc.zip
Added IceGrid allocate demo
-rwxr-xr-xcs/All.sln14
-rw-r--r--cs/All_11.sln16
-rw-r--r--cs/demo/IceGrid/Makefile3
-rw-r--r--cs/demo/IceGrid/allocate/.depend1
-rw-r--r--cs/demo/IceGrid/allocate/Client.cs210
-rw-r--r--cs/demo/IceGrid/allocate/Hello.ice24
-rw-r--r--cs/demo/IceGrid/allocate/HelloI.cs32
-rw-r--r--cs/demo/IceGrid/allocate/Makefile35
-rw-r--r--cs/demo/IceGrid/allocate/README50
-rw-r--r--cs/demo/IceGrid/allocate/Server.cs29
-rwxr-xr-xcs/demo/IceGrid/allocate/allocateC.csproj111
-rwxr-xr-xcs/demo/IceGrid/allocate/allocateCD.csproj105
-rw-r--r--cs/demo/IceGrid/allocate/allocateCD_11.csproj105
-rw-r--r--cs/demo/IceGrid/allocate/allocateC_11.csproj105
-rwxr-xr-xcs/demo/IceGrid/allocate/allocateS.csproj109
-rwxr-xr-xcs/demo/IceGrid/allocate/allocateSD.csproj100
-rw-r--r--cs/demo/IceGrid/allocate/allocateSD_11.csproj100
-rw-r--r--cs/demo/IceGrid/allocate/allocateS_11.csproj105
-rw-r--r--cs/demo/IceGrid/allocate/application-multiple.xml33
-rw-r--r--cs/demo/IceGrid/allocate/application-single.xml27
-rw-r--r--cs/demo/IceGrid/allocate/config.client4
-rw-r--r--cs/demo/IceGrid/allocate/config.grid35
-rw-r--r--cs/demo/IceGrid/allocate/db/node/.dummy0
-rw-r--r--cs/demo/IceGrid/allocate/db/registry/.dummy0
-rw-r--r--cs/demo/IceGrid/allocate/generated/.dummy0
-rw-r--r--cs/demo/IceGrid/sessionActivation/Hello.ice1
-rw-r--r--cs/demo/IceGrid/sessionActivation/HelloI.cs6
-rw-r--r--cs/demo/demo.sln16
-rw-r--r--cs/demo/demo_11.sln16
-rw-r--r--java/demo/IceGrid/allocate/Client.java226
-rw-r--r--java/demo/IceGrid/allocate/Hello.ice24
-rw-r--r--java/demo/IceGrid/allocate/HelloI.java33
-rw-r--r--java/demo/IceGrid/allocate/README30
-rw-r--r--java/demo/IceGrid/allocate/Server.java31
-rw-r--r--java/demo/IceGrid/allocate/application-multiple.xml34
-rw-r--r--java/demo/IceGrid/allocate/application-single.xml28
-rw-r--r--java/demo/IceGrid/allocate/build.xml49
-rw-r--r--java/demo/IceGrid/allocate/config.client4
-rw-r--r--java/demo/IceGrid/allocate/config.grid35
-rw-r--r--java/demo/IceGrid/allocate/db/node/.dummy0
-rw-r--r--java/demo/IceGrid/allocate/db/registry/.dummy0
-rw-r--r--java/demo/IceGrid/build.xml3
-rw-r--r--py/demo/IceGrid/allocate/Client.py118
-rw-r--r--py/demo/IceGrid/allocate/Hello.ice24
-rw-r--r--py/demo/IceGrid/allocate/README30
-rw-r--r--py/demo/IceGrid/allocate/Server.py38
-rw-r--r--py/demo/IceGrid/allocate/application-multiple.xml34
-rw-r--r--py/demo/IceGrid/allocate/application-single.xml28
-rw-r--r--py/demo/IceGrid/allocate/config.client4
-rw-r--r--py/demo/IceGrid/allocate/config.grid35
-rw-r--r--py/demo/IceGrid/allocate/db/node/.dummy0
-rw-r--r--py/demo/IceGrid/allocate/db/registry/.dummy0
-rw-r--r--py/demo/IceGrid/sessionActivation/Hello.ice1
-rw-r--r--py/demo/IceGrid/sessionActivation/Server.py4
54 files changed, 2190 insertions, 15 deletions
diff --git a/cs/All.sln b/cs/All.sln
index c53de3304f6..96652de20ec 100755
--- a/cs/All.sln
+++ b/cs/All.sln
@@ -309,6 +309,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sessionActivationC", "demo\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sessionActivationS", "demo\IceGrid\sessionActivation\sessionActivationS.csproj", "{22671377-E93B-4496-87D7-EEBE5C0704C0}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateC", "demo\IceGrid\allocate\allocateC.csproj", "{1970CA1E-464B-4BF8-B556-528C521D4FD9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateS", "demo\IceGrid\allocate\allocateS.csproj", "{19701377-E93B-4496-87D7-EEBE5C0704C0}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "holdS", "test\Ice\hold\holdS.csproj", "{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "holdC", "test\Ice\hold\holdC.csproj", "{32B32B03-DAF1-4444-A3F1-474FDD8DB9E1}"
@@ -664,7 +668,15 @@ Global
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A98E1377-E93B-4496-87D7-EEBE5C0704C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {22671377-E93B-4496-87D7-EEBE5C0704C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Release|Any CPU.Build.0 = Release|Any CPU
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/cs/All_11.sln b/cs/All_11.sln
index 5f3206444f7..adbf3a0c0a7 100644
--- a/cs/All_11.sln
+++ b/cs/All_11.sln
@@ -344,6 +344,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sessionActivationS_11", "de
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateC_11", "demo\IceGrid\allocate\allocateC_11.csproj", "{1970CA1E-464B-4BF8-B556-528C521D4FD9}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateS_11", "demo\IceGrid\allocate\allocateS_11.csproj", "{19701377-E93B-4496-87D7-EEBE5C0704C0}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "holdS_11", "test\Ice\hold\holdS_11.csproj", "{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
@@ -716,6 +724,14 @@ Global
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Debug.Build.0 = Debug|.NET
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Release.ActiveCfg = Release|.NET
{22671377-E93B-4496-87D7-EEBE5C0704C0}.Release.Build.0 = Release|.NET
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Debug.ActiveCfg = Debug|.NET
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Debug.Build.0 = Debug|.NET
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Release.ActiveCfg = Release|.NET
+ {1970CA1E-464B-4BF8-B556-528C521D4FD9}.Release.Build.0 = Release|.NET
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Debug.ActiveCfg = Debug|.NET
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Debug.Build.0 = Debug|.NET
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Release.ActiveCfg = Release|.NET
+ {19701377-E93B-4496-87D7-EEBE5C0704C0}.Release.Build.0 = Release|.NET
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Debug.ActiveCfg = Debug|.NET
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Debug.Build.0 = Debug|.NET
{5BC31123-AD81-4D27-A5CC-7C8F67AA962F}.Release.ActiveCfg = Release|.NET
diff --git a/cs/demo/IceGrid/Makefile b/cs/demo/IceGrid/Makefile
index 5be671bfef1..9f86d4b64f8 100644
--- a/cs/demo/IceGrid/Makefile
+++ b/cs/demo/IceGrid/Makefile
@@ -12,7 +12,8 @@ top_srcdir = ../..
include $(top_srcdir)/config/Make.rules.cs
SUBDIRS = simple \
- sessionActivation
+ sessionActivation \
+ allocate
$(EVERYTHING)::
@for subdir in $(SUBDIRS); \
diff --git a/cs/demo/IceGrid/allocate/.depend b/cs/demo/IceGrid/allocate/.depend
new file mode 100644
index 00000000000..d36db71ec3d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/.depend
@@ -0,0 +1 @@
+Hello.cs: ./Hello.ice
diff --git a/cs/demo/IceGrid/allocate/Client.cs b/cs/demo/IceGrid/allocate/Client.cs
new file mode 100644
index 00000000000..c23726a4188
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/Client.cs
@@ -0,0 +1,210 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+using System;
+using System.Threading;
+using Demo;
+
+
+public class Client : Ice.Application
+{
+ class SessionKeepAliveThread
+ {
+ public SessionKeepAliveThread(IceGrid.SessionPrx session)
+ {
+ _session = session;
+ _timeout = 5000;
+ _terminated = false;
+ }
+
+ public void run()
+ {
+ lock(this)
+ {
+ while(!_terminated)
+ {
+ System.Threading.Monitor.Wait(this, _timeout);
+ if(_terminated)
+ {
+ break;
+ }
+ try
+ {
+ _session.keepAlive();
+ }
+ catch(Ice.LocalException)
+ {
+ break;
+ }
+ }
+ }
+ }
+
+ public void terminate()
+ {
+ lock(this)
+ {
+ _terminated = true;
+ System.Threading.Monitor.Pulse(this);
+ }
+ }
+
+ private IceGrid.SessionPrx _session;
+ private int _timeout;
+ private bool _terminated;
+ }
+
+ private void menu()
+ {
+ Console.Out.WriteLine(
+ "usage:\n" +
+ "t: send greeting\n" +
+ "x: exit\n" +
+ "?: help\n");
+ }
+
+ public override int run(string[] args)
+ {
+ IceGrid.RegistryPrx registry =
+ IceGrid.RegistryPrxHelper.checkedCast(communicator().stringToProxy("DemoIceGrid/Registry"));
+ if(registry == null)
+ {
+ Console.WriteLine(": cound not contact registry");
+ return 1;
+ }
+
+
+ IceGrid.SessionPrx session = null;
+ while(true)
+ {
+ Console.Out.WriteLine("This demo accepts any user-id / password combination.");
+
+ string id;
+ Console.Out.Write("user id: ");
+ Console.Out.Flush();
+ id = Console.In.ReadLine();
+
+ string pw;
+ Console.Out.Write("password: ");
+ Console.Out.Flush();
+ pw = Console.In.ReadLine();
+
+ try
+ {
+ session = registry.createSession(id, pw);
+ break;
+ }
+ catch(IceGrid.PermissionDeniedException ex)
+ {
+ Console.WriteLine("permission denied:\n" + ex.reason);
+ }
+ }
+
+ SessionKeepAliveThread keepAlive = new SessionKeepAliveThread(session);
+ Thread keepAliveThread = new Thread(new ThreadStart(keepAlive.run));
+ keepAliveThread.Start();
+
+ HelloPrx hello = null;
+ try
+ {
+ hello = HelloPrxHelper.checkedCast(session.allocateObjectById(communicator().stringToIdentity("hello")));
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ Console.WriteLine(": could not allocate object: " + ex.reason);
+ return 1;
+ }
+ catch(IceGrid.ObjectNotRegisteredException)
+ {
+ Console.WriteLine(": object not registered with registry");
+ return 1;
+ }
+ if(hello == null)
+ {
+ try
+ {
+ hello = HelloPrxHelper.checkedCast(session.allocateObjectByType("::Demo::Hello"));
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ Console.WriteLine(": could not allocate object: " + ex.reason);
+ return 1;
+ }
+ }
+
+ menu();
+
+ string line = null;
+ do
+ {
+ try
+ {
+ Console.Write("==> ");
+ Console.Out.Flush();
+ line = Console.In.ReadLine();
+ if(line == null)
+ {
+ break;
+ }
+ if(line.Equals("t"))
+ {
+ hello.sayHello();
+ }
+ else if(line.Equals("x"))
+ {
+ // Nothing to do
+ }
+ else if(line.Equals("?"))
+ {
+ menu();
+ }
+ else
+ {
+ Console.WriteLine("unknown command `" + line + "'");
+ menu();
+ }
+ }
+ catch(Ice.LocalException ex)
+ {
+ Console.WriteLine(ex);
+ }
+ }
+ while(!line.Equals("x"));
+
+ keepAlive.terminate();
+ keepAliveThread.Join();
+ keepAlive = null;
+
+ try
+ {
+ session.releaseObject(hello.ice_getIdentity());
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ Console.WriteLine(": could not release object: " + ex.reason);
+ return 1;
+ }
+ catch(IceGrid.ObjectNotRegisteredException)
+ {
+ Console.WriteLine(": object not registered with registry");
+ return 1;
+ }
+
+ session.destroy();
+
+ return 0;
+ }
+
+ public static void Main(string[] args)
+ {
+ Client app = new Client();
+ int status = app.main(args, "config.client");
+ System.Environment.Exit(status);
+ }
+}
diff --git a/cs/demo/IceGrid/allocate/Hello.ice b/cs/demo/IceGrid/allocate/Hello.ice
new file mode 100644
index 00000000000..a83a5c601b7
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/Hello.ice
@@ -0,0 +1,24 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+module Demo
+{
+
+interface Hello
+{
+ nonmutating void sayHello();
+ idempotent void shutdown();
+};
+
+};
+
+#endif
diff --git a/cs/demo/IceGrid/allocate/HelloI.cs b/cs/demo/IceGrid/allocate/HelloI.cs
new file mode 100644
index 00000000000..ae7e431b217
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/HelloI.cs
@@ -0,0 +1,32 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+using System;
+using Demo;
+
+public class HelloI : HelloDisp_
+{
+ public HelloI(string name)
+ {
+ _name = name;
+ }
+
+ public override void sayHello(Ice.Current current)
+ {
+ Console.WriteLine(_name + " says Hello World!");
+ }
+
+ public override void shutdown(Ice.Current current)
+ {
+ Console.WriteLine(_name + " shutting down...");
+ current.adapter.getCommunicator().shutdown();
+ }
+
+ private string _name;
+}
diff --git a/cs/demo/IceGrid/allocate/Makefile b/cs/demo/IceGrid/allocate/Makefile
new file mode 100644
index 00000000000..0eff8c31d93
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/Makefile
@@ -0,0 +1,35 @@
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+TARGETS = client.exe server.exe
+
+C_SRCS = Client.cs
+S_SRCS = HelloI.cs Server.cs
+
+SLICE_SRCS = $(SDIR)/Hello.ice
+
+SDIR = .
+
+GDIR = generated
+
+include $(top_srcdir)/config/Make.rules.cs
+
+MCSFLAGS := $(MCSFLAGS) -target:exe
+
+SLICE2CSFLAGS := $(SLICE2CSFLAGS) --ice -I. -I$(slicedir)
+
+client.exe: $(C_SRCS) $(GEN_SRCS)
+ $(MCS) $(MCSFLAGS) -out:$@ $(call ref,icecs) $(call ref,icegridcs) $^
+
+server.exe: $(S_SRCS) $(GEN_SRCS)
+ $(MCS) $(MCSFLAGS) -out:$@ $(call ref,icecs) $^
+
+include .depend
diff --git a/cs/demo/IceGrid/allocate/README b/cs/demo/IceGrid/allocate/README
new file mode 100644
index 00000000000..b2dab78b1c5
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/README
@@ -0,0 +1,50 @@
+Note for Mono:
+
+ For this demo to work properly using Mono on Linux, you must
+ configure Linux to recognize Mono binaries. Configuration
+ instructions are provided in INSTALL.MONO at the top level of the
+ Ice for C# source distribution or, in README at the top level of
+ the Ice binary distribution (in /usr/share/doc/Ice-@ver@ if you
+ have installed Ice from RPMs).
+
+ Alternatively, if you do not want to reconfigure your kernel, or
+ if you want to run with Mono under Windows, edit application.xml
+ and change the server element to read:
+
+ <server id="SimpleServer" exe="mono" activation="on-demand">
+ <option>./server.exe</option>
+
+ Note that the server executable is "mono", and that the actual
+ server executable is passed as an argument to the Mono
+ interepreter.
+
+To run the demo, first start the IceGrid service:
+
+$ icegridnode --Ice.Config=config.grid
+
+This demo contains two application descriptor files. The first descriptor,
+application-single.xml, contains a single server and object. This object is
+allocated by the client by using allocateById. Only one client can access this
+object at a time. All other clients will hang until object is released. To
+deploy this descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-single.xml'"
+
+The second descriptor, application-multiple.xml, contains servers, each with an
+object. The clients retrieve these objects using allocateByType. Since there are two
+objects available, two clients can get access simulaneously. Extra clients will hang
+until one of the clients with an object allocated releases it. To deploy this
+descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-multiple.xml'"
+
+To run the client type:
+
+$ client.exe
+
+If you have already deployed the application, you can update it to try
+a different set of descriptors, for example:
+
+$ icegridadmin --Ice.Config=config.grid -e "application update 'application-multiple.xml'"
+
+Messages will be displayed in the IceGrid service window.
diff --git a/cs/demo/IceGrid/allocate/Server.cs b/cs/demo/IceGrid/allocate/Server.cs
new file mode 100644
index 00000000000..0270419690f
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/Server.cs
@@ -0,0 +1,29 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+public class Server : Ice.Application
+{
+ public override int run(string[] args)
+ {
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
+ Ice.Properties properties = communicator().getProperties();
+ Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
+ adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id);
+ adapter.activate();
+ communicator().waitForShutdown();
+ return 0;
+ }
+
+ static public void Main(string[] args)
+ {
+ Server app = new Server();
+ int status = app.main(args);
+ System.Environment.Exit(status);
+ }
+}
diff --git a/cs/demo/IceGrid/allocate/allocateC.csproj b/cs/demo/IceGrid/allocate/allocateC.csproj
new file mode 100755
index 00000000000..5e6884544cc
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateC.csproj
@@ -0,0 +1,111 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1970CA1E-464B-4BF8-B556-528C521D4FD9}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>client</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>
+ </RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>.\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>.\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <ProjectReference Include="..\..\..\src\IceGrid\IceGrid.csproj">
+ <Name>IceGrid</Name>
+ <Project>{08BA06BB-1803-4EF5-81A1-467DF5464A9E}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\src\Glacier2\Glacier2.csproj">
+ <Name>Glacier2</Name>
+ <Project>{F6EAFA67-FF43-4C8B-BF7F-86F79DCCDA1A}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\src\Ice\Ice.csproj">
+ <Name>Ice</Name>
+ <Project>{C3630502-8F67-42BF-B4CA-A21D2EA8049E}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Client.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="generated\Hello.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>"$(SolutionDir)."\bin\generatecs.exe "$(SolutionDir)." "$(ProjectDir)." $(ProjectName)</PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/cs/demo/IceGrid/allocate/allocateCD.csproj b/cs/demo/IceGrid/allocate/allocateCD.csproj
new file mode 100755
index 00000000000..97ac9c951b3
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateCD.csproj
@@ -0,0 +1,105 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{1970CFB0-D945-4ED0-9E1D-6053A86BA43E}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "client"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = '"$(SolutionDir)."\..\bin\generatecs.exe "$(SolutionDir)." "$(ProjectDir)." $(ProjectName)'
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "icecs"
+ AssemblyName = "icecs"
+ HintPath = "..\..\..\bin\icecs.dll"
+ />
+ <Reference
+ Name = "icegridcs"
+ AssemblyName = "icegridcs"
+ HintPath = "..\..\..\bin\icegridcs.dll"
+ />
+ <Reference
+ Name = "glacier2cs"
+ AssemblyName = "glacier2cs"
+ HintPath = "..\..\bin\glacier2cs.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Client.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/allocateCD_11.csproj b/cs/demo/IceGrid/allocate/allocateCD_11.csproj
new file mode 100644
index 00000000000..03c5791182b
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateCD_11.csproj
@@ -0,0 +1,105 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{1970CFB0-D945-4ED0-9E1D-6053A86BA43E}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "client"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = "$(SolutionDir)\..\bin\generatecs.exe $(SolutionDir) $(ProjectDir) allocateCD"
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "icecs"
+ AssemblyName = "icecs"
+ HintPath = "..\..\..\bin\icecs.dll"
+ />
+ <Reference
+ Name = "icegridcs"
+ AssemblyName = "icegridcs"
+ HintPath = "..\..\..\bin\icegridcs.dll"
+ />
+ <Reference
+ Name = "glacier2cs"
+ AssemblyName = "glacier2cs"
+ HintPath = "..\..\bin\glacier2cs.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Client.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/allocateC_11.csproj b/cs/demo/IceGrid/allocate/allocateC_11.csproj
new file mode 100644
index 00000000000..da6cf393939
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateC_11.csproj
@@ -0,0 +1,105 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{1970CA1E-464B-4BF8-B556-528C521D4FD9}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "client"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = "$(SolutionDir)\bin\generatecs.exe $(SolutionDir) $(ProjectDir) allocateC"
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "Ice"
+ Project = "{C3630502-8F67-42BF-B4CA-A21D2EA8049E}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ <Reference
+ Name = "IceGrid"
+ Project = "{08BA06BB-1803-4EF5-81A1-467DF5464A9E}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ <Reference
+ Name = "Glacier2"
+ Project = "{F6EAFA67-FF43-4C8B-BF7F-86F79DCCDA1A}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Client.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/allocateS.csproj b/cs/demo/IceGrid/allocate/allocateS.csproj
new file mode 100755
index 00000000000..2f2bd49a64d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateS.csproj
@@ -0,0 +1,109 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{19701377-E93B-4496-87D7-EEBE5C0704C0}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>server</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>
+ </RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>.\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>.\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <ProjectReference Include="..\..\..\src\IceGrid\IceGrid.csproj">
+ <Name>IceGrid</Name>
+ <Project>{08BA06BB-1803-4EF5-81A1-467DF5464A9E}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\src\Ice\Ice.csproj">
+ <Name>Ice</Name>
+ <Project>{C3630502-8F67-42BF-B4CA-A21D2EA8049E}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="generated\Hello.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="HelloI.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Server.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>"$(SolutionDir)."\bin\generatecs.exe "$(SolutionDir)." "$(ProjectDir)." $(ProjectName)</PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
diff --git a/cs/demo/IceGrid/allocate/allocateSD.csproj b/cs/demo/IceGrid/allocate/allocateSD.csproj
new file mode 100755
index 00000000000..3c1a1c81144
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateSD.csproj
@@ -0,0 +1,100 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "server"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = '"$(SolutionDir)."\..\bin\generatecs.exe "$(SolutionDir)." "$(ProjectDir)." $(ProjectName)'
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "icecs"
+ AssemblyName = "icecs"
+ HintPath = "..\..\..\bin\icecs.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "HelloI.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Server.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/allocateSD_11.csproj b/cs/demo/IceGrid/allocate/allocateSD_11.csproj
new file mode 100644
index 00000000000..ae256e3e99d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateSD_11.csproj
@@ -0,0 +1,100 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "server"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = "$(SolutionDir)\..\bin\generatecs.exe $(SolutionDir) $(ProjectDir) allocateSD"
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "icecs"
+ AssemblyName = "icecs"
+ HintPath = "..\..\..\bin\icecs.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "HelloI.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Server.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/allocateS_11.csproj b/cs/demo/IceGrid/allocate/allocateS_11.csproj
new file mode 100644
index 00000000000..aaec7c08b9b
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/allocateS_11.csproj
@@ -0,0 +1,105 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{19701377-E93B-4496-87D7-EEBE5C0704C0}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "server"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ PreBuildEvent = "$(SolutionDir)\bin\generatecs.exe $(SolutionDir) $(ProjectDir) allocateS"
+ PostBuildEvent = ""
+ RootNamespace = ""
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE;ICE_DOTNET_1X"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = ".\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "true"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "Ice"
+ Project = "{C3630502-8F67-42BF-B4CA-A21D2EA8049E}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ <Reference
+ Name = "IceGrid"
+ Project = "{08BA06BB-1803-4EF5-81A1-467DF5464A9E}"
+ Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "HelloI.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Server.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "generated\Hello.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/cs/demo/IceGrid/allocate/application-multiple.xml b/cs/demo/IceGrid/allocate/application-multiple.xml
new file mode 100644
index 00000000000..5ed33a9b59f
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/application-multiple.xml
@@ -0,0 +1,33 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <server-template id="AllocateServer">
+ <parameter name="index"/>
+ <server id="AllocateServer-${index}" exe="./server.exe" activation="on-demand">
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello-${index}" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello-${index}"/>
+ </server>
+ </server-template>
+
+ <node name="localhost">
+ <server-instance template="AllocateServer" index="1"/>
+ <server-instance template="AllocateServer" index="2"/>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/cs/demo/IceGrid/allocate/application-single.xml b/cs/demo/IceGrid/allocate/application-single.xml
new file mode 100644
index 00000000000..a10b5a6a679
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/application-single.xml
@@ -0,0 +1,27 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <node name="localhost">
+ <server id="AllocateServer" exe="./server.exe" activation="on-demand">
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello"/>
+ </server>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/cs/demo/IceGrid/allocate/config.client b/cs/demo/IceGrid/allocate/config.client
new file mode 100644
index 00000000000..78100695847
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/config.client
@@ -0,0 +1,4 @@
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
diff --git a/cs/demo/IceGrid/allocate/config.grid b/cs/demo/IceGrid/allocate/config.grid
new file mode 100644
index 00000000000..293580f58bc
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/config.grid
@@ -0,0 +1,35 @@
+IceGrid.InstanceName=DemoIceGrid
+
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
+
+#
+# IceGrid registry configuration.
+#
+IceGrid.Registry.Client.Endpoints=default -p 12000
+IceGrid.Registry.Server.Endpoints=default
+IceGrid.Registry.Internal.Endpoints=default
+IceGrid.Registry.Admin.Endpoints=default
+IceGrid.Registry.Data=db/registry
+IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+
+#
+# IceGrid node configuration.
+#
+IceGrid.Node.Name=localhost
+IceGrid.Node.Endpoints=default
+IceGrid.Node.Data=db/node
+IceGrid.Node.CollocateRegistry=1
+#IceGrid.Node.Output=db
+#IceGrid.Node.RedirectErrToOut=1
+
+#
+# Trace properties.
+#
+IceGrid.Node.Trace.Activator=1
+IceGrid.Node.Trace.Patch=1
+#IceGrid.Node.Trace.Adapter=2
+#IceGrid.Node.Trace.Server=3
diff --git a/cs/demo/IceGrid/allocate/db/node/.dummy b/cs/demo/IceGrid/allocate/db/node/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/db/node/.dummy
diff --git a/cs/demo/IceGrid/allocate/db/registry/.dummy b/cs/demo/IceGrid/allocate/db/registry/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/db/registry/.dummy
diff --git a/cs/demo/IceGrid/allocate/generated/.dummy b/cs/demo/IceGrid/allocate/generated/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/cs/demo/IceGrid/allocate/generated/.dummy
diff --git a/cs/demo/IceGrid/sessionActivation/Hello.ice b/cs/demo/IceGrid/sessionActivation/Hello.ice
index a83a5c601b7..a883de1344c 100644
--- a/cs/demo/IceGrid/sessionActivation/Hello.ice
+++ b/cs/demo/IceGrid/sessionActivation/Hello.ice
@@ -16,7 +16,6 @@ module Demo
interface Hello
{
nonmutating void sayHello();
- idempotent void shutdown();
};
};
diff --git a/cs/demo/IceGrid/sessionActivation/HelloI.cs b/cs/demo/IceGrid/sessionActivation/HelloI.cs
index ae7e431b217..df1784bf96e 100644
--- a/cs/demo/IceGrid/sessionActivation/HelloI.cs
+++ b/cs/demo/IceGrid/sessionActivation/HelloI.cs
@@ -22,11 +22,5 @@ public class HelloI : HelloDisp_
Console.WriteLine(_name + " says Hello World!");
}
- public override void shutdown(Ice.Current current)
- {
- Console.WriteLine(_name + " shutting down...");
- current.adapter.getCommunicator().shutdown();
- }
-
private string _name;
}
diff --git a/cs/demo/demo.sln b/cs/demo/demo.sln
index b96526ab022..94230a08c48 100644
--- a/cs/demo/demo.sln
+++ b/cs/demo/demo.sln
@@ -127,6 +127,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sessionActivationSD", "IceG
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateCD", "IceGrid\allocate\allocateCD.csproj", "{1970CFB0-D945-4ED0-9E1D-6053A86BA43E}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateSD", "IceGrid\allocate\allocateSD.csproj", "{197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "clockCD", "IceStorm\clock\clockCD.csproj", "{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
@@ -273,6 +281,14 @@ Global
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.Build.0 = Debug|.NET
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.ActiveCfg = Release|.NET
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.Build.0 = Release|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Debug.ActiveCfg = Debug|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Debug.Build.0 = Debug|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Release.ActiveCfg = Release|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Release.Build.0 = Release|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.ActiveCfg = Debug|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.Build.0 = Debug|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.ActiveCfg = Release|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.Build.0 = Release|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Debug.ActiveCfg = Debug|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Debug.Build.0 = Debug|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Release.ActiveCfg = Release|.NET
diff --git a/cs/demo/demo_11.sln b/cs/demo/demo_11.sln
index 24ae13eb920..05b4d7a8f50 100644
--- a/cs/demo/demo_11.sln
+++ b/cs/demo/demo_11.sln
@@ -127,6 +127,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sessionActivationSD", "IceG
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateCD", "IceGrid\allocate\allocateCD_11.csproj", "{1970CFB0-D945-4ED0-9E1D-6053A86BA43E}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "allocateSD", "IceGrid\allocate\allocateSD_11.csproj", "{197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "clockCD", "IceStorm\clock\clockCD_11.csproj", "{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
@@ -273,6 +281,14 @@ Global
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.Build.0 = Debug|.NET
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.ActiveCfg = Release|.NET
{226790B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.Build.0 = Release|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Debug.ActiveCfg = Debug|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Debug.Build.0 = Debug|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Release.ActiveCfg = Release|.NET
+ {1970CFB0-D945-4ED0-9E1D-6053A86BA43E}.Release.Build.0 = Release|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.ActiveCfg = Debug|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Debug.Build.0 = Debug|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.ActiveCfg = Release|.NET
+ {197090B7-88D5-47EB-B8FD-2BEF5A08E0D9}.Release.Build.0 = Release|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Debug.ActiveCfg = Debug|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Debug.Build.0 = Debug|.NET
{E76D1D8E-7154-461D-BAFA-A3BB2E5D6D7A}.Release.ActiveCfg = Release|.NET
diff --git a/java/demo/IceGrid/allocate/Client.java b/java/demo/IceGrid/allocate/Client.java
new file mode 100644
index 00000000000..609d367c133
--- /dev/null
+++ b/java/demo/IceGrid/allocate/Client.java
@@ -0,0 +1,226 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+import Demo.*;
+
+public class Client extends Ice.Application
+{
+ static private class SessionKeepAliveThread extends Thread
+ {
+ SessionKeepAliveThread(IceGrid.SessionPrx session)
+ {
+ _session = session;
+ _timeout = 5000;
+ _terminated = false;
+ }
+
+ synchronized public void
+ run()
+ {
+ while(!_terminated)
+ {
+ try
+ {
+ wait(_timeout);
+ }
+ catch(InterruptedException e)
+ {
+ }
+ if(_terminated)
+ {
+ break;
+ }
+ try
+ {
+ _session.keepAlive();
+ }
+ catch(Ice.LocalException ex)
+ {
+ break;
+ }
+ }
+ }
+
+ synchronized private void
+ terminate()
+ {
+ _terminated = true;
+ notify();
+ }
+
+ final private IceGrid.SessionPrx _session;
+ final private long _timeout;
+ private boolean _terminated;
+ }
+
+ private void
+ menu()
+ {
+ System.out.println(
+ "usage:\n" +
+ "t: send greeting\n" +
+ "s: shutdown server\n" +
+ "x: exit\n" +
+ "?: help\n");
+ }
+
+ public int
+ run(String[] args)
+ {
+ IceGrid.RegistryPrx registry =
+ IceGrid.RegistryPrxHelper.checkedCast(communicator().stringToProxy("DemoIceGrid/Registry"));
+ if(registry == null)
+ {
+ System.err.println(": cound not contact registry");
+ return 1;
+ }
+
+ java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
+ IceGrid.SessionPrx session;
+ while(true)
+ {
+ System.out.println("This demo accepts any user-id / password combination.");
+
+ try
+ {
+ String id;
+ System.out.print("user id: ");
+ System.out.flush();
+ id = in.readLine();
+
+ String pw;
+ System.out.print("password: ");
+ System.out.flush();
+ pw = in.readLine();
+
+ try
+ {
+ session = registry.createSession(id, pw);
+ break;
+ }
+ catch(IceGrid.PermissionDeniedException ex)
+ {
+ System.out.println("permission denied:\n" + ex.reason);
+ }
+ }
+ catch(java.io.IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ SessionKeepAliveThread keepAlive = new SessionKeepAliveThread(session);
+ keepAlive.start();
+
+ //
+ // First try to retrieve object by identity, which will work if the application-single.xml
+ // descriptor is used. Otherwise we retrieve object by type, which will succeed if the
+ // application-multiple.xml descriptor is used.
+ //
+ HelloPrx hello = null;
+ try
+ {
+ hello = HelloPrxHelper.checkedCast(session.allocateObjectById(communicator().stringToIdentity("hello")));
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ }
+ catch(IceGrid.ObjectNotRegisteredException ex)
+ {
+ }
+ if(hello == null)
+ {
+ try
+ {
+ hello = HelloPrxHelper.checkedCast(session.allocateObjectByType("::Demo::Hello"));
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ System.err.println(": could not allocate object: " + ex.reason);
+ return 1;
+ }
+ }
+
+ menu();
+
+ String line = null;
+ do
+ {
+ try
+ {
+ System.out.print("==> ");
+ System.out.flush();
+ line = in.readLine();
+ if(line == null)
+ {
+ break;
+ }
+ if(line.equals("t"))
+ {
+ hello.sayHello();
+ }
+ else if(line.equals("s"))
+ {
+ hello.shutdown();
+ }
+ else if(line.equals("x"))
+ {
+ // Nothing to do
+ }
+ else if(line.equals("?"))
+ {
+ menu();
+ }
+ else
+ {
+ System.out.println("unknown command `" + line + "'");
+ menu();
+ }
+ }
+ catch(java.io.IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ catch(Ice.LocalException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+ while(!line.equals("x"));
+
+ keepAlive.terminate();
+
+ try
+ {
+ session.releaseObject(hello.ice_getIdentity());
+ }
+ catch(IceGrid.AllocationException ex)
+ {
+ System.err.println(": could not release object: " + ex.reason);
+ return 1;
+ }
+ catch(IceGrid.ObjectNotRegisteredException ex)
+ {
+ System.err.println(": object not registered with registry");
+ return 1;
+ }
+
+ session.destroy();
+
+ return 0;
+ }
+
+ public static void
+ main(String[] args)
+ {
+ Client app = new Client();
+ int status = app.main("Client", args, "config.client");
+ System.exit(status);
+ }
+}
diff --git a/java/demo/IceGrid/allocate/Hello.ice b/java/demo/IceGrid/allocate/Hello.ice
new file mode 100644
index 00000000000..a83a5c601b7
--- /dev/null
+++ b/java/demo/IceGrid/allocate/Hello.ice
@@ -0,0 +1,24 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+module Demo
+{
+
+interface Hello
+{
+ nonmutating void sayHello();
+ idempotent void shutdown();
+};
+
+};
+
+#endif
diff --git a/java/demo/IceGrid/allocate/HelloI.java b/java/demo/IceGrid/allocate/HelloI.java
new file mode 100644
index 00000000000..105a27c659a
--- /dev/null
+++ b/java/demo/IceGrid/allocate/HelloI.java
@@ -0,0 +1,33 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+import Demo.*;
+
+public class HelloI extends _HelloDisp
+{
+ public HelloI(String name)
+ {
+ _name = name;
+ }
+
+ public void
+ sayHello(Ice.Current current)
+ {
+ System.out.println(_name + " says Hello World!");
+ }
+
+ public void
+ shutdown(Ice.Current current)
+ {
+ System.out.println(_name + " shutting down...");
+ current.adapter.getCommunicator().shutdown();
+ }
+
+ private final String _name;
+}
diff --git a/java/demo/IceGrid/allocate/README b/java/demo/IceGrid/allocate/README
new file mode 100644
index 00000000000..4e8bd18e8b3
--- /dev/null
+++ b/java/demo/IceGrid/allocate/README
@@ -0,0 +1,30 @@
+To run the demo, first start the IceGrid service:
+
+$ icegridnode --Ice.Config=config.grid
+
+This demo contains two application descriptor files. The first descriptor,
+application-single.xml, contains a single server and object. This object is
+allocated by the client by using allocateById. Only one client can access this
+object at a time. All other clients will hang until object is released. To
+deploy this descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-single.xml'"
+
+The second descriptor, application-multiple.xml, contains servers, each with an
+object. The clients retrieve these objects using allocateByType. Since there are two
+objects available, two clients can get access simulaneously. Extra clients will hang
+until one of the clients with an object allocated releases it. To deploy this
+descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-multiple.xml'"
+
+To run the client type:
+
+$ java Client
+
+If you have already deployed the application, you can update it to try
+a different set of descriptors, for example:
+
+$ icegridadmin --Ice.Config=config.grid -e "application update 'application-multiple.xml'"
+
+Messages will be displayed in the IceGrid service window.
diff --git a/java/demo/IceGrid/allocate/Server.java b/java/demo/IceGrid/allocate/Server.java
new file mode 100644
index 00000000000..5ad0ec96c4d
--- /dev/null
+++ b/java/demo/IceGrid/allocate/Server.java
@@ -0,0 +1,31 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+public class Server extends Ice.Application
+{
+ public int
+ run(String[] args)
+ {
+ Ice.ObjectAdapter adapter = communicator().createObjectAdapter("Hello");
+ Ice.Properties properties = communicator().getProperties();
+ Ice.Identity id = communicator().stringToIdentity(properties.getProperty("Identity"));
+ adapter.add(new HelloI(properties.getProperty("Ice.ServerId")), id);
+ adapter.activate();
+ communicator().waitForShutdown();
+ return 0;
+ }
+
+ static public void
+ main(String[] args)
+ {
+ Server app = new Server();
+ int status = app.main("Server", args);
+ System.exit(status);
+ }
+}
diff --git a/java/demo/IceGrid/allocate/application-multiple.xml b/java/demo/IceGrid/allocate/application-multiple.xml
new file mode 100644
index 00000000000..63cb943a16d
--- /dev/null
+++ b/java/demo/IceGrid/allocate/application-multiple.xml
@@ -0,0 +1,34 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <server-template id="AllocateServer">
+ <parameter name="index"/>
+ <server id="AllocateServer-${index}" exe="java" activation="on-demand">
+ <option>Server</option>
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello-${index}" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello-${index}"/>
+ </server>
+ </server-template>
+
+ <node name="localhost">
+ <server-instance template="AllocateServer" index="1"/>
+ <server-instance template="AllocateServer" index="2"/>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/java/demo/IceGrid/allocate/application-single.xml b/java/demo/IceGrid/allocate/application-single.xml
new file mode 100644
index 00000000000..88b1c31dafe
--- /dev/null
+++ b/java/demo/IceGrid/allocate/application-single.xml
@@ -0,0 +1,28 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <node name="localhost">
+ <server id="AllocateServer" exe="java" activation="on-demand">
+ <option>Server</option>
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello"/>
+ </server>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/java/demo/IceGrid/allocate/build.xml b/java/demo/IceGrid/allocate/build.xml
new file mode 100644
index 00000000000..29a540b7167
--- /dev/null
+++ b/java/demo/IceGrid/allocate/build.xml
@@ -0,0 +1,49 @@
+<!--
+ **********************************************************************
+
+ 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.
+
+ **********************************************************************
+-->
+
+<project name="demo_IceGrid_allocate" default="all" basedir=".">
+
+ <!-- set global properties for this build -->
+ <property name="top.dir" value="../../.."/>
+
+ <!-- import common definitions -->
+ <import file="${top.dir}/config/common.xml"/>
+
+ <target name="generate" depends="init">
+ <!-- Create the output directory for generated code -->
+ <mkdir dir="${generated.dir}"/>
+ <slice2java outputdir="${generated.dir}">
+ <fileset dir="." includes="Hello.ice"/>
+ </slice2java>
+ </target>
+
+ <target name="compile" depends="generate">
+ <mkdir dir="${class.dir}"/>
+ <javac srcdir="${generated.dir}" destdir="${class.dir}"
+ source="${jdk.version}" debug="${debug}">
+ <classpath refid="ice.classpath"/>
+ <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ </javac>
+ <javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
+ excludes="generated/**" debug="${debug}">
+ <classpath refid="ice.classpath"/>
+ <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ </javac>
+ </target>
+
+ <target name="all" depends="compile"/>
+
+ <target name="clean">
+ <delete dir="${generated.dir}"/>
+ <delete dir="${class.dir}"/>
+ </target>
+
+</project>
diff --git a/java/demo/IceGrid/allocate/config.client b/java/demo/IceGrid/allocate/config.client
new file mode 100644
index 00000000000..78100695847
--- /dev/null
+++ b/java/demo/IceGrid/allocate/config.client
@@ -0,0 +1,4 @@
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
diff --git a/java/demo/IceGrid/allocate/config.grid b/java/demo/IceGrid/allocate/config.grid
new file mode 100644
index 00000000000..293580f58bc
--- /dev/null
+++ b/java/demo/IceGrid/allocate/config.grid
@@ -0,0 +1,35 @@
+IceGrid.InstanceName=DemoIceGrid
+
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
+
+#
+# IceGrid registry configuration.
+#
+IceGrid.Registry.Client.Endpoints=default -p 12000
+IceGrid.Registry.Server.Endpoints=default
+IceGrid.Registry.Internal.Endpoints=default
+IceGrid.Registry.Admin.Endpoints=default
+IceGrid.Registry.Data=db/registry
+IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+
+#
+# IceGrid node configuration.
+#
+IceGrid.Node.Name=localhost
+IceGrid.Node.Endpoints=default
+IceGrid.Node.Data=db/node
+IceGrid.Node.CollocateRegistry=1
+#IceGrid.Node.Output=db
+#IceGrid.Node.RedirectErrToOut=1
+
+#
+# Trace properties.
+#
+IceGrid.Node.Trace.Activator=1
+IceGrid.Node.Trace.Patch=1
+#IceGrid.Node.Trace.Adapter=2
+#IceGrid.Node.Trace.Server=3
diff --git a/java/demo/IceGrid/allocate/db/node/.dummy b/java/demo/IceGrid/allocate/db/node/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/java/demo/IceGrid/allocate/db/node/.dummy
diff --git a/java/demo/IceGrid/allocate/db/registry/.dummy b/java/demo/IceGrid/allocate/db/registry/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/java/demo/IceGrid/allocate/db/registry/.dummy
diff --git a/java/demo/IceGrid/build.xml b/java/demo/IceGrid/build.xml
index 4c024c03f4f..4196afd95df 100644
--- a/java/demo/IceGrid/build.xml
+++ b/java/demo/IceGrid/build.xml
@@ -14,11 +14,12 @@
<target name="all">
<ant dir="simple"/>
<ant dir="sessionActivation"/>
+ <ant dir="allocate"/>
</target>
<target name="clean">
<ant dir="simple" target="clean"/>
- <ant dir="sessionActivation" target="clean"/>
+ <ant dir="allocate" target="clean"/>
</target>
</project>
diff --git a/py/demo/IceGrid/allocate/Client.py b/py/demo/IceGrid/allocate/Client.py
new file mode 100644
index 00000000000..05f1f557270
--- /dev/null
+++ b/py/demo/IceGrid/allocate/Client.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+import sys, threading, Ice, IceGrid
+
+Ice.loadSlice('Hello.ice')
+import Demo
+
+def menu():
+ print """
+usage:
+t: send greeting
+s: shutdown server
+x: exit
+?: help
+"""
+
+class SessionKeepAliveThread(threading.Thread):
+ def __init__(self, session):
+ threading.Thread.__init__(self)
+ self._session = session
+ self._timeout = 5
+ self._terminated = False
+ self._cond = threading.Condition()
+
+ def run(self):
+ self._cond.acquire()
+ try:
+ while not self._terminated:
+ self._cond.wait(self._timeout)
+ if self._terminated:
+ break
+ try:
+ self._session.keepAlive()
+ except Ice.LocalException, ex:
+ break
+ finally:
+ self._cond.release()
+
+ def terminate(self):
+ self._cond.acquire()
+ try:
+ self._terminated = True
+ self._cond.notify()
+ finally:
+ self._cond.release()
+
+class Client(Ice.Application):
+ def run(self, args):
+ registry = IceGrid.RegistryPrx.checkedCast(self.communicator().stringToProxy("DemoIceGrid/Registry"))
+ if registry == None:
+ print self.appName() + ": cound not contact registry"
+ return False
+
+ while True:
+ print "This demo accepts any user-id / password combination."
+ id = raw_input("user id: ").strip()
+ pw = raw_input("password: ").strip()
+ try:
+ session = registry.createSession(id, pw)
+ break
+ except IceGrid.PermissionDeniedException, ex:
+ print "permission denied:\n" + ex.reason
+
+ keepAlive = SessionKeepAliveThread(session)
+ keepAlive.start()
+
+ hello = None
+ try:
+ hello = Demo.HelloPrx.checkedCast(session.allocateObjectById(self.communicator().stringToIdentity("hello")))
+ except IceGrid.AllocationException, ex:
+ pass
+ except IceGrid.ObjectNotRegisteredException:
+ pass
+ if hello == None:
+ try:
+ hello = Demo.HelloPrx.checkedCast(session.allocateObjectByType("::Demo::Hello"))
+ except IceGrid.AllocationException, ex:
+ print self.appName() + ": could not allocate object: " + ex.reason
+ return False
+
+ menu()
+
+ c = None
+ while c != 'x':
+ try:
+ c = raw_input("==> ")
+ if c == 't':
+ hello.sayHello()
+ elif c == 's':
+ hello.shutdown()
+ elif c == 'x':
+ pass # Nothing to do
+ elif c == '?':
+ menu()
+ else:
+ print "unknown command `" + c + "'"
+ menu()
+ except EOFError:
+ break
+
+ keepAlive.terminate()
+ keepAlive.join()
+
+ session.releaseObject(hello.ice_getIdentity())
+ session.destroy();
+
+ return True
+
+app = Client()
+sys.exit(app.main(sys.argv, "config.client"))
diff --git a/py/demo/IceGrid/allocate/Hello.ice b/py/demo/IceGrid/allocate/Hello.ice
new file mode 100644
index 00000000000..a83a5c601b7
--- /dev/null
+++ b/py/demo/IceGrid/allocate/Hello.ice
@@ -0,0 +1,24 @@
+// **********************************************************************
+//
+// 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.
+//
+// **********************************************************************
+
+#ifndef HELLO_ICE
+#define HELLO_ICE
+
+module Demo
+{
+
+interface Hello
+{
+ nonmutating void sayHello();
+ idempotent void shutdown();
+};
+
+};
+
+#endif
diff --git a/py/demo/IceGrid/allocate/README b/py/demo/IceGrid/allocate/README
new file mode 100644
index 00000000000..668cb89b7f9
--- /dev/null
+++ b/py/demo/IceGrid/allocate/README
@@ -0,0 +1,30 @@
+To run the demo, first start the IceGrid service:
+
+$ icegridnode --Ice.Config=config.grid
+
+This demo contains two application descriptor files. The first descriptor,
+application-single.xml, contains a single server and object. This object is
+allocated by the client by using allocateById. Only one client can access this
+object at a time. All other clients will hang until object is released. To
+deploy this descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-single.xml'"
+
+The second descriptor, application-multiple.xml, contains servers, each with an
+object. The clients retrieve these objects using allocateByType. Since there are two
+objects available, two clients can get access simulaneously. Extra clients will hang
+until one of the clients with an object allocated releases it. To deploy this
+descriptor use:
+
+$ icegridadmin --Ice.Config=config.grid -e "application add 'application-multiple.xml'"
+
+To run the client type:
+
+$ python Client
+
+If you have already deployed the application, you can update it to try
+a different set of descriptors, for example:
+
+$ icegridadmin --Ice.Config=config.grid -e "application update 'application-multiple.xml'"
+
+Messages will be displayed in the IceGrid service window.
diff --git a/py/demo/IceGrid/allocate/Server.py b/py/demo/IceGrid/allocate/Server.py
new file mode 100644
index 00000000000..750d5e30800
--- /dev/null
+++ b/py/demo/IceGrid/allocate/Server.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# 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.
+#
+# **********************************************************************
+
+import sys, traceback, Ice
+
+Ice.loadSlice('Hello.ice')
+import Demo
+
+class HelloI(Demo.Hello):
+ def __init__(self, name):
+ self.name = name
+
+ def sayHello(self, current=None):
+ print self.name + " says Hello World!"
+
+ def shutdown(self, current=None):
+ print self.name + " shutting down..."
+ current.adapter.getCommunicator().shutdown()
+
+class Server(Ice.Application):
+ def run(self, args):
+ properties = self.communicator().getProperties()
+ adapter = self.communicator().createObjectAdapter("Hello")
+ id = self.communicator().stringToIdentity(properties.getProperty("Identity"))
+ adapter.add(HelloI(properties.getProperty("Ice.ServerId")), id)
+ adapter.activate()
+ self.communicator().waitForShutdown()
+ return 0
+
+app = Server()
+sys.exit(app.main(sys.argv))
diff --git a/py/demo/IceGrid/allocate/application-multiple.xml b/py/demo/IceGrid/allocate/application-multiple.xml
new file mode 100644
index 00000000000..646603a1e2c
--- /dev/null
+++ b/py/demo/IceGrid/allocate/application-multiple.xml
@@ -0,0 +1,34 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <server-template id="AllocateServer">
+ <parameter name="index"/>
+ <server id="AllocateServer-${index}" exe="python" activation="on-demand">
+ <option>Server.py</option>
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello-${index}" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello-${index}"/>
+ </server>
+ </server-template>
+
+ <node name="localhost">
+ <server-instance template="AllocateServer" index="1"/>
+ <server-instance template="AllocateServer" index="2"/>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/py/demo/IceGrid/allocate/application-single.xml b/py/demo/IceGrid/allocate/application-single.xml
new file mode 100644
index 00000000000..f6296ad4d0e
--- /dev/null
+++ b/py/demo/IceGrid/allocate/application-single.xml
@@ -0,0 +1,28 @@
+<!--
+ **********************************************************************
+
+ 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="Allocate">
+
+ <node name="localhost">
+ <server id="AllocateServer" exe="python" activation="on-demand">
+ <option>Server.py</option>
+ <adapter name="Hello" endpoints="tcp" register-process="true">
+ <object identity="hello" type="::Demo::Hello"/>
+ </adapter>
+ <property name="Identity" value="hello"/>
+ </server>
+ </node>
+
+ </application>
+
+</icegrid>
diff --git a/py/demo/IceGrid/allocate/config.client b/py/demo/IceGrid/allocate/config.client
new file mode 100644
index 00000000000..78100695847
--- /dev/null
+++ b/py/demo/IceGrid/allocate/config.client
@@ -0,0 +1,4 @@
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
diff --git a/py/demo/IceGrid/allocate/config.grid b/py/demo/IceGrid/allocate/config.grid
new file mode 100644
index 00000000000..293580f58bc
--- /dev/null
+++ b/py/demo/IceGrid/allocate/config.grid
@@ -0,0 +1,35 @@
+IceGrid.InstanceName=DemoIceGrid
+
+#
+# The IceGrid locator proxy.
+#
+Ice.Default.Locator=DemoIceGrid/Locator:default -p 12000
+
+#
+# IceGrid registry configuration.
+#
+IceGrid.Registry.Client.Endpoints=default -p 12000
+IceGrid.Registry.Server.Endpoints=default
+IceGrid.Registry.Internal.Endpoints=default
+IceGrid.Registry.Admin.Endpoints=default
+IceGrid.Registry.Data=db/registry
+IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
+
+#
+# IceGrid node configuration.
+#
+IceGrid.Node.Name=localhost
+IceGrid.Node.Endpoints=default
+IceGrid.Node.Data=db/node
+IceGrid.Node.CollocateRegistry=1
+#IceGrid.Node.Output=db
+#IceGrid.Node.RedirectErrToOut=1
+
+#
+# Trace properties.
+#
+IceGrid.Node.Trace.Activator=1
+IceGrid.Node.Trace.Patch=1
+#IceGrid.Node.Trace.Adapter=2
+#IceGrid.Node.Trace.Server=3
diff --git a/py/demo/IceGrid/allocate/db/node/.dummy b/py/demo/IceGrid/allocate/db/node/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/py/demo/IceGrid/allocate/db/node/.dummy
diff --git a/py/demo/IceGrid/allocate/db/registry/.dummy b/py/demo/IceGrid/allocate/db/registry/.dummy
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/py/demo/IceGrid/allocate/db/registry/.dummy
diff --git a/py/demo/IceGrid/sessionActivation/Hello.ice b/py/demo/IceGrid/sessionActivation/Hello.ice
index a83a5c601b7..a883de1344c 100644
--- a/py/demo/IceGrid/sessionActivation/Hello.ice
+++ b/py/demo/IceGrid/sessionActivation/Hello.ice
@@ -16,7 +16,6 @@ module Demo
interface Hello
{
nonmutating void sayHello();
- idempotent void shutdown();
};
};
diff --git a/py/demo/IceGrid/sessionActivation/Server.py b/py/demo/IceGrid/sessionActivation/Server.py
index 750d5e30800..43b3913e68e 100644
--- a/py/demo/IceGrid/sessionActivation/Server.py
+++ b/py/demo/IceGrid/sessionActivation/Server.py
@@ -20,10 +20,6 @@ class HelloI(Demo.Hello):
def sayHello(self, current=None):
print self.name + " says Hello World!"
- def shutdown(self, current=None):
- print self.name + " shutting down..."
- current.adapter.getCommunicator().shutdown()
-
class Server(Ice.Application):
def run(self, args):
properties = self.communicator().getProperties()