
OSGi provides a highly dynamic and well designed services model for a single JVM. OSGi's unit of deployment, the Bundle, uses a state of the art peer classloading model, rather than a traditional hierarchical classloading model. This enables OSGi to guarantee a consistent class view across the container and avoids the classloader related class mismatch errors that plague hierarchical approaches. Bundles also have a well defined lifecycle from install to uninstall. OSGI bundles also improve on the encapsulation provided by traditional jar files, publically exposing only those classes which form part of their intended API, and keeping the rest private. Physically bundles are just jar files with extra metadata, via which inter bundle dependencies can be resolved.
OSGi also makes use of an internal services registry, via which services created during the lifetime of different bundles can find each other.
Additionally, OSGi has a well thought through security model at both Bundle and Service level.
Open Source OSGi projects include:
SCA is a language, runtime and protocol agnostic component wireup standard. Essentially it allows for the specification of a hierarchical assembly of components, either within a single runtime, or distributed across disparate systems.
Jini provides a service oriented model that explicitly addresses the realities of distributed computing. In particular Jini provides a distributed registry, via which remote services can find each other, and makes extensive use of leasing to ensure reclamation of resources that are not explicitly release by failed clients. Jini also provides a high quality extensible RMI stack, and strong support for network level and remote code security.











[ edit ]