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 shoshould 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 mechanic
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