|
|
|
|
|
|
Re: Problems with ZooDiscovery [message #1515735 is a reply to message #1514343] |
Thu, 18 December 2014 05:21   |
Eclipse User |
|
|
|
I figured out that the bundles org.eclipse.ecf.remoteservice and org.eclipse.ecf.server.generic are not started, when running as a RCP application. So I added the following lines to the activator of my applications:
Platform.getBundle("org.eclipse.ecf.remoteservice").start();
Platform.getBundle("org.eclipse.ecf.server.generic").start();
Platform.getBundle("org.eclipse.ecf.provider.zookeeper").start();
Now the bundles are started (checked with a breakpoint in its activators), but still the generic server is not running (checked by trying to connect to it).
I use the following code to register my service:
Dictionary<String, String> props = new Hashtable<>();
props.put("service.exported.interfaces", "*");
props.put("service.exported.configs", "ecf.generic.server");
props.put("ecf.generic.server.hostname", "hostname_of_my_local_machine");
props.put("ecf.generic.server.port", "3282");
props.put("ecf.generic.server.path ", "/server");
ServiceRegistration<MyService> reg = bundleContext.registerService(
MyService.class, new MyServiceImpl(), props);
The ECF generic server works in a RCP application (without manually starting any bundles), if I manually create a ServiceTracker, a IContainer and a IRemoteServiceContainerAdapter (see github.com/ECF/ECF-Examples/tree/master/org.eclipse.ecf.examples.remoteservices.generic.host).
But I was not able to use ZooKeeper with that approach.
Any ideas?
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26507 seconds