Previous Topic

Next Topic

Book Contents

Book Index

Creating a Component

To create a component, write its implementation Java class and component description then pack them into a bundle JAR file.

Component Description Manifest Header

A bundle providing a component must have special header in its manifest that specifies the XML document of the component description:

Service-Component: <path to the XML document's location>

Service-Component: myComponent/ComponentDescriptionXML.xml

Component Description Elements

The elements included in a component description vary depending on the functionality a component provides.

Generally, the possible elements of a component description are:

For further information on the component description elements, refer to the component description schema provided in the OSGi Declarative Services Specification Release 4.