蓝图 XML 文件定义和描述应用程序的各种组件。
“蓝图”XML 文件包含各个组件管理器的定义。“蓝图容器”规范定义了四个主要组件管理器:一个 Bean 管理器、一个服务管理器以及两个服务引用管理器。每个管理器具有一个相应的 XML 元素,该元素描述管理器的属性。每一个管理器都负责创建和管理它们所创建的组件的生命周期,从而提供组件实例。
Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml,OSGI-INF/blueprint/helloWorldRef.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>
有关“蓝图容器”规范的更多信息,请参阅 OSGi Alliance Web 站点上的“简要规范”。