Equinox outline [note]

Equinox

l        an OSGi R4 specification implementation

l        Involve: OSGi framework implement, OSGi standard service bundles implementation, OSGi server-side App(J2EE), Equinox deployment framework

 

Modularity

l        Objective: changes in on part of a system should not lead to unexpected behavior in other parts

l        We need to be able to share classes and resource between bundles(modules), two main ways: Require-Bundle & Import-Package

 

Require-Bundle

l        Gain access to all packages exported by another bundle

l        Tight coupling

Import-Package

l        Import specific packages

l        Loose coupling

 

Best Practices: Modularity

l        Import-Package is recommended

l        Require-Bundles used for complex scenarios

 

Collaboration

Inter bundle collaboration:

l        Extension registry

l        Service registry

l        Declarative Services(build upon the service registry)

 

Extension Registry

l        A per extension point list of contributed extensions

l        Private context

l        Tightly coupled model

l        Declarative : plugin.xml

l        Lazy loading

l        Life cycle scope: resolved state of bundle

l        No security to control

 

Service Registry

l        Pblish/discover/bind model

l        Public context

l        Loosely coupled model

l        API based , non declarative

l        Eager loading

l        Life cycle scope: started state of bundle

l        Permissions to control

 

Declarative Services

l        Build upon Service Registry

l        Adds a declarative mechanism

l        Simplified programming model: POJO with dependency injection(IoC)

l        Lazy loading

l        Lifecycle managed by central runtime

Best practices: collaboration

l        Extension Registry: tightly coupled relationship

l        Declarative Services: loosely coupled relationship(recommended)

l        Service Registry: same as Declarative Services, unless have a complex need

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值