WebSphere® Application Server
Liberty 包含用于管理 Java 批处理作业的 RESTful 管理接口。受管批处理启用安全 HTTPS REST 接口,以便您可在外部管理 Java 批处理作业。
过程
- 将 batchManagement-1.0 功能部件添加至 server.xml 文件。
<featureManager>
<feature>batchManagement-1.0</feature>
</featureManager>
- 通过配置 Java 批处理功能部件使用的 databaseStore 来配置批处理持久性。使用
jobStoreRef 元素在 server.xml 文件中引用 databaseStore。 以下示例演示 server.xml 文件的外观。
<batchPersistence jobStoreRef="BatchDatabaseStore" />
<databaseStore id="BatchDatabaseStore" dataSourceRef="batchDB" />
有关数据库持久性(包括表的自动创建与手动创建)的更多信息,请参阅 Java 批处理持久性配置。
- 在 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>
要点: 此示例中的缺省自签名 SSL 证书仅适用于开发,不适用于生产。
有关配置批处理环境的基于角色的管理及为用户分配角色的信息,请参阅“保护 Liberty 批处理环境”。
结果
现在已为 Liberty 服务器配置 RESTful 接口。