OSGi Blueprint XML files
Blueprint XML files define and describe the various components of an application.
The Blueprint XML file contains definitions of various component managers. The Blueprint Container specification defines four main component managers: a bean manager, a service manager, and two service reference managers. Each manager has a corresponding XML element that describes the manager properties. Each manager is responsible for creating and managing the lifecycle of the components they create, providing a component instance.
The blueprint files for a bundle are XML files in the OSGI-INF/blueprint directory. You can also name specific files using the Bundle-Blueprint
property in the bundle manifest file. For example:
Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml,OSGI-INF/blueprint/helloWorldRef.xml
The following code is an example of the contents of a blueprint
file, OSGI-INF/blueprint/blueprint.xml:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<bean activation="lazy" id="helloEBA" class="com.ibm.ws.eba.helloWorld.HelloWorldEBAImpl" init-method="hello">
</bean>
<service ranking="0" auto-export="disabled" interface="com.ibm.ws.eba.helloWorld.HelloWorldEBA" ref="helloEBA">
</service>
</blueprint>
For more information about the Blueprint Container specification, see the Compendium Specification on the OSGi Alliance website.