THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
public class Activator implements BundleActivator { private ServiceRegistration reg; public void start(BundleContext bc) throws Exception { Dictionary props = new Hashtable(); String host = getHostName(); // obtain the current host name int port = getPort(); // find a free port props.put("osgiservice.remoteexported.interfaces", "*"); props.put("osgiservice.remoteexported.configuration.typeconfigs", "pojoorg.apache.cxf.ws"); props.put("osgiorg.remoteapache.configurationcxf.pojows.address", "http://" + host + ":" + port + "/display"); reg = bc.registerService(DisplayService.class.getName(), new DisplayServiceImpl(host + ":" + port), props); } public void stop(BundleContext bc) throws Exception { reg.unregister(); } } |
...