OSGi Blueprint XML 文件

蓝图 XML 文件定义和描述应用程序的各种组件。

“蓝图”XML 文件包含各个组件管理器的定义。“蓝图容器”规范定义了四个主要组件管理器:一个 Bean 管理器、一个服务管理器以及两个服务引用管理器。每个管理器具有一个相应的 XML 元素,该元素描述管理器的属性。每一个管理器都负责创建和管理它们所创建的组件的生命周期,从而提供组件实例。

捆绑软件的蓝图文件是 OSGI-INF/blueprint 目录中的 XML 文件。您也可以使用捆绑软件清单文件中的 Bundle-Blueprint 属性给特定的文件命名。例如:
Bundle-Blueprint: OSGI-INF/blueprint/blueprint.xml,OSGI-INF/blueprint/helloWorldRef.xml
以下代码是蓝图文件 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>

有关“蓝图容器”规范的更多信息,请参阅 OSGi Alliance Web 站点上的“简要规范”。

指示主题类型的图标 概念主题
信息中心的条款和条件 | 反馈

时间戳记图标 最近一次更新时间: 2014 年 4 月 17 日

文件名:cblueprintxml.html