OSGi Getting Started notes

Source: Internet
Author: User

The OSGi framework defines a dynamic modular system for Java that allows you to better control the structure of your code, dynamically manage the life cycle of your code, and provides a loosely coupled approach to code writing, and more notably, its specification documentation is exhaustive. --"OSGi combat"

OSGi tiering Architecture

Service Layer

Focus on the interaction and communication between the modules, especially the components within the module.

Life cycle Layer

Focus on providing execution-time module management and access to the underlying OSGi framework.

Module layer

Focus on packaging and sharing code

BUNDLE:OSGI defines the concrete implementation of its modular concept, containing code, resources, and metadata in the form of a jar file.

The main difference between bundles and ordinary jars is metadata, which uses metadata to manage its modular features, which are stored in the meta-inf/manifest of the jar file. MF in.

Life Cycle API

Bundleactivator (Start, stop): is a bundle entry, similar to the main method in Java.

Bundlecontext: Provides a way for an application to manipulate the OSGi framework when executing.

Bundle: Represents a bundle that has been installed into the framework, allowing state operations on it.





















Maven Plugin: Maven-bundle-plugin

OSGi Getting Started notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.