01: package org.objectweb.celtix.systest.ws.rm;
02:
03: import javax.xml.ws.Endpoint;
04:
05: import org.objectweb.celtix.bus.busimpl.BusConfigurationBuilder;
06: import org.objectweb.celtix.configuration.ConfigurationBuilder;
07: import org.objectweb.celtix.configuration.ConfigurationBuilderFactory;
08: import org.objectweb.celtix.systest.common.TestServerBase;
09:
10: public class ShutdownTestServer extends TestServerBase {
11:
12: protected void run() {
13:
14: ControlImpl
15: .setConfigFileProperty("oneway-terminate-on-shutdown");
16: ConfigurationBuilder builder = ConfigurationBuilderFactory
17: .getBuilder();
18: builder
19: .buildConfiguration(
20: BusConfigurationBuilder.BUS_CONFIGURATION_URI,
21: "celtix");
22:
23: GreeterImpl implementor = new GreeterImpl();
24: String address = "http://localhost:9000/SoapContext/GreeterPort";
25: Endpoint.publish(address, implementor);
26:
27: }
28:
29: public static void main(String[] args) {
30: try {
31: ShutdownTestServer s = new ShutdownTestServer();
32: s.start();
33: } catch (Exception ex) {
34: ex.printStackTrace();
35: System.exit(-1);
36: } finally {
37: System.out.println("done!");
38: }
39: }
40: }
|