1

能否指出我在这个 bndrun 文件中缺少哪些捆绑包,用于在 OSGI 框架中注册远程服务。我在构建您的第一个远程 osgi 服务链接中遵循了以下示例。

我已经注册了这样的服务:

    public void start(BundleContext context) throws Exception {
    Dictionary<String, String> props = new Hashtable<>();
    props.put("service.exported.interfaces", "*");
    props.put("service.exported.configs", "ecf.generic.server");
    context.registerService(ITimeService.class.getName(),
                new TimeServiceImpl(), props);
}

这是我的 bndrun 文件的 runrequires 部分:

runrequires: \
osgi.identity;filter:='(osgi.identity=org.siu.casa.timeservice.host.org.siu.casa.timeservice.host.api.impl)',\
osgi.identity;filter:='(osgi.identity=org.siu.casa.timeservice.host.org.siu.casa.timeservice.api)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.runtime)',\
osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\
osgi.identity;filter:='(&(osgi.identity=org.osgi.service.event)(version>=1.3.1))',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf)',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf.discovery)',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf.identity)',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf.osgi.services.remoteserviceadmin)',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy)',\
osgi.identity;filter:='(osgi.identity=org.eclipse.ecf.provider.remoteservice)',\
osgi.identity;filter:='(&(osgi.identity=org.eclipse.equinox.registry)(version>=3.5.400))'
4

0 回答 0