summaryrefslogtreecommitdiff
path: root/java/test/Ice/servantLocator/Server.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/test/Ice/servantLocator/Server.java')
-rw-r--r--java/test/Ice/servantLocator/Server.java39
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);
+ }
+}