ICE 3.4.2
[php5-ice-freebsdport.git] / java / test / Ice / exceptions / Collocated.java
blob483fc8ff44a642b1010ff32f4f173233e83c4d70
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 package test.Ice.exceptions;
12 public class Collocated extends test.Util.Application
14 public int
15 run(String[] args)
17 Ice.Communicator communicator = communicator();
18 Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
19 Ice.Object object = new ThrowerI();
20 adapter.add(object, communicator.stringToIdentity("thrower"));
22 AllTests.allTests(communicator, true, getWriter());
24 return 0;
27 protected Ice.InitializationData getInitData(Ice.StringSeqHolder argsH)
29 Ice.InitializationData initData = new Ice.InitializationData();
30 initData.properties = Ice.Util.createProperties(argsH);
31 initData.properties.setProperty("Ice.Package.Test", "test.Ice.exceptions");
32 initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010");
33 return initData;
36 public static void
37 main(String[] args)
39 Collocated app = new Collocated();
40 int result = app.main("Collocated", args);
41 System.gc();
42 System.exit(result);