Equinox outline [note]

來源:互聯網
上載者:User

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

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.