Liberty 儲存庫[8.5.5.6 或更新版本]

配置 Liberty 設定檔以使用批次 REST API

WebSphere Application Server Liberty 設定檔含有 RESTful 管理介面,用來管理您的 Java 批次工作。受管理批次會啟用安全 HTTPS REST 介面,因此您可在外部管理 Java 批次工作。

程序

  1. batchManagement-1.0 特性新增至 server.xml 檔。
    <featureManager>
    	<feature>batchManagement-1.0</feature>
    </featureManager>
  2. 配置 Java 批次特性使用的 databaseStore,來配置批次持續性。在 server.xml 檔中使用 jobStoreRef 元素,來參照 databaseStore 下列範例說明 server.xml 檔的外觀。
    <batchPersistence jobStoreRef="BatchDatabaseStore" />
    
    <databaseStore id="BatchDatabaseStore" dataSourceRef="batchDB" />

    如需資料庫持續性的相關資訊(包括自動建立與手動建立表格的對照),請參閱 Java 批次持續性配置。

  3. server.xml 檔中建立 SSL 憑證和使用者登錄,使 batchManagement-1.0 自動啟用 SSL 特性。
    <keyStore id="defaultKeyStore" password="Liberty"/>
    			
    <basicRegistry id="basic" realm="ibm/api">
    	<user name="bob" password="bobpwd" />
    	<user name="jane" password="janepwd" />
    </basicRegistry>
    
    <authorization-roles id="com.ibm.ws.batch">
    	<security-role name="batchAdmin" >
    		<user name="bob" />
    	</security-role>
    </authorization-roles>

    如需定義其他使用者和角色的相關資訊,請參閱「維護 Liberty 設定檔批次環境的安全」。

    重要: 本例中的預設自簽 SSL 憑證僅作為開發用,不適用於正式作業。

結果

現在已將 RESTful 介面配置給 Liberty 設定檔伺服器。


指示主題類型的圖示 作業主題

資訊中心條款 | 意見


「時間戳記」圖示 前次更新: 2015 年 6 月 22 日
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_batch_configrest
檔名:twlp_batch_configrest.html