OSGi 藍圖 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 聯盟網站上的「概略規格」。

Icon that indicates the type of topic Concept topic
Timestamp icon Last updated: last_date

File name: cblueprintxml.html