简体   繁体   English

Eclipse Virgo中的OSGI服务绑定器

[英]OSGI service binder in Eclipse Virgo

In order to manage dynamic dependencies between OSGI services, the service binder bundle was introduced here . 为了管理OSGI服务之间的动态依赖关系, 此处引入了服务绑定程序包。 This service controls the availability of required services in the OSGI platform and establishes the bindings between services following their availability and a binding policy described in the bundle component descriptor. 该服务控制OSGI平台中所需服务的可用性,并根据服务的可用性和捆绑组件描述符中描述的绑定策略在服务之间建立绑定。 This customizes the bundle activation when the required services are not available. 当所需的服务不可用时,这将自定义捆绑包激活。 Is such service provided in Virgo or do we have to add and adapt the service binder in Virgo ? 处女座是否提供这种服务,还是我们必须在处女座中添加和调整服务绑定器?

Thanks. 谢谢。

The service binder is not provided with Virgo, but (as Holly suggests) there are some OSGi standard alternatives that satisfy the kinds of requirements you have. 处女座没有提供服务绑定器,但是(如Holly建议的那样),有一些OSGi标准替代品可以满足您的各种需求。 Two standards involve declaring services and service references in metadata in your bundles: Blueprint and Declarative Services. 有两个标准涉及在包中的元数据中声明服务和服务引用:Blueprint和Declarative Services。 These are described in the OSGi specifications and various published books on OSGi. 这些已在OSGi规范和有关OSGi的各种出版书籍中进行了描述。

OSGi Blueprint is implemented by the Gemini Blueprint component which is being included in Virgo 3.5.0 due to ship mid 2012. Earlier versions of Virgo included Spring DM 1.2.1 which is the technology which gave rise to the Blueprint standard. OSGi Blueprint由Gemini Blueprint组件实现,该组件将在2012年中期交付给Virgo 3.5.0中。早期版本的Virgo包括Spring DM 1.2.1,该技术产生了Blueprint标准。 So on earlier versions, you can either use Spring DM directly -- its features are roughly a superset of those provided by Blueprint with slightly different, Spring-like syntax -- or you can add Gemini Blueprint to Virgo yourself (a web search should turn up the technique). 因此,在较早的版本中,您可以直接使用Spring DM(它的功能大约是Blueprint提供的功能的超集,并且具有类似Spring的语法,但略有不同),或者您可以将Gemini Blueprint自己添加到处女座(通过网络搜索技术)。

OSGi Declarative Services is (are?) another alternative and this was included in Virgo 3.0. OSGi声明式服务是另一种替代方法,它已包含在Virgo 3.0中。 Indeed service binder was the inspiration for Declarative Services. 实际上,服务绑定器是声明式服务的灵感来源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM