From 26c33e45e09f6c635f6a663f05e9edb51f5461ef Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Wed, 10 Jan 2007 10:22:43 +0000 Subject: Fixed bug 1650 --- java/test/Ice/servantLocator/Server.java | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 java/test/Ice/servantLocator/Server.java (limited to 'java/test/Ice/servantLocator/Server.java') 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); + } +} -- cgit v1.2.3