如果您使用 WebSphere® 最佳化本端配接器 (WOLA) 支援的其中一個 Java™ EE 連接器架構 (JCA) 記錄介面來傳遞資料,您可以使用 Rational® Application Developer CICS®/IMS™ Java 資料連結精靈,來產生 Record 類別。
關於這項作業
您可以使用 Rational Application Developer CICS/IMS Java 資料連結精靈,產生 javax.resource.cci.Record 物件,這個物件可以取代 IndexRecordImpl 和 MappedRecordImpl 物件中用來傳送和接收資料的位元組陣列。如果要使用產生的 Record 類別,您必須在 Liberty 伺服器實例中設定一個額外的程式庫,以便讓伺服器實例能夠序列化和解除序列化 Record 物件中的資料。
程序
- 將配置 JAR 檔從 Rational Application Developer,複製到含有 server.xml 檔之伺服器配置目錄之下的 lib 子目錄。 配置 JAR 檔的確切名稱與位置,取決於 Rational Application Developer 的版本,但是 JAR 檔名稱的開頭是 com.ibm.etools.marshall.runtime。 例如,配置 JAR 檔可以是 plugins/com.ibm.etools.marshall.runtime_6.1.300.v20130321_2211.jar。
- 在 server.xml 檔中,建立 library 元素,使其指向配置 JAR 檔的新位置,如下列範例所示: 請以您配置 JAR 檔的實際名稱,取代 marshall.jar。
<!-- RAD 產生之應用程式類別所要求的程式庫。-->
<library id="MarshallLib">
<file name="${server.config.dir}/lib/marshall.jar"/>
</library>
- 在 server.xml 檔中,指定您在 classloader 元素中所建立的程式庫 ID,以便將該程式庫新增至含有所產生之 Record 類別的應用程式定義。 下列範例是將 MarshallLib 程式庫新增至 WolaApp 應用程式。
<!-- Application installed in ${server.config.dir}/apps. -->
<application id="WolaApp" name="WolaApp" location="OLA.ear">
<classloader commonLibraryRef="MarshallLib"/>
</application>