diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-09-04 12:34:41 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-09-04 12:34:41 -0700 |
commit | a86b114d82c678b49ab2b43c16abff1f8239d5d6 (patch) | |
tree | db649f2762d87a991de02b2c2c641029a01cac85 /java/test/Ice/classLoader/Server.java | |
parent | Converted demo projects to VS2008 (diff) | |
download | ice-a86b114d82c678b49ab2b43c16abff1f8239d5d6.tar.bz2 ice-a86b114d82c678b49ab2b43c16abff1f8239d5d6.tar.xz ice-a86b114d82c678b49ab2b43c16abff1f8239d5d6.zip |
bug 4196 - add class loader to InitializationData
Diffstat (limited to 'java/test/Ice/classLoader/Server.java')
-rw-r--r-- | java/test/Ice/classLoader/Server.java | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/java/test/Ice/classLoader/Server.java b/java/test/Ice/classLoader/Server.java new file mode 100644 index 00000000000..fa68d032e53 --- /dev/null +++ b/java/test/Ice/classLoader/Server.java @@ -0,0 +1,41 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 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. +// +// ********************************************************************** + +package test.Ice.classLoader; + +public class Server extends test.Util.Application +{ + public int run(String[] args) + { + Ice.Communicator communicator = communicator(); + Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter"); + Ice.Object object = new InitialI(adapter); + adapter.add(object, communicator.stringToIdentity("initial")); + adapter.activate(); + + return WAIT; + } + + protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH) + { + Ice.InitializationData initData = new Ice.InitializationData(); + initData.properties = Ice.Util.createProperties(argsH); + initData.properties.setProperty("Ice.Package.Test", "test.Ice.classLoader"); + initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010"); + return initData; + } + + public static void main(String[] args) + { + Server app = new Server(); + int result = app.main("Server", args); + System.gc(); + System.exit(result); + } +} |