diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-01-10 10:22:43 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-01-10 10:22:43 +0000 |
commit | 26c33e45e09f6c635f6a663f05e9edb51f5461ef (patch) | |
tree | 55caad6a4594a51899948b9451171098dbc7fb1e /java/test/Ice/servantLocator/Server.java | |
parent | Win32 fix (diff) | |
download | ice-26c33e45e09f6c635f6a663f05e9edb51f5461ef.tar.bz2 ice-26c33e45e09f6c635f6a663f05e9edb51f5461ef.tar.xz ice-26c33e45e09f6c635f6a663f05e9edb51f5461ef.zip |
Fixed bug 1650
Diffstat (limited to 'java/test/Ice/servantLocator/Server.java')
-rw-r--r-- | java/test/Ice/servantLocator/Server.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/java/test/Ice/servantLocator/Server.java b/java/test/Ice/servantLocator/Server.java new file mode 100644 index 00000000000..a6e9f74be45 --- /dev/null +++ b/java/test/Ice/servantLocator/Server.java @@ -0,0 +1,39 @@ +// ********************************************************************** +// +// 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 +{ + static class TestServer extends Ice.Application + { + public int + run(String[] args) + { + communicator().getProperties().setProperty("Ice.OA.TestAdapter.Endpoints", "default -p 12010 -t 10000"); + communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0"); + + Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter"); + adapter.addServantLocator(new ServantLocatorI("category"), "category"); + adapter.addServantLocator(new ServantLocatorI(""), ""); + adapter.add(new TestI(), communicator().stringToIdentity("asm")); + + adapter.activate(); + adapter.waitForDeactivate(); + return 0; + } + } + + public static void + main(String[] args) + { + TestServer app = new TestServer(); + int result = app.main("Server", args); + System.gc(); + System.exit(result); + } +} |