使用 wsadmin 脚本来启用 WSDM
将 wsadmin 工具与 AdminConfig 对象搭配使用,以在环境中启用 Web Service 分布式管理 (WSDM)。WSDM 是一个经 OASIS 核准的标准,支持通过标准化的 Web Service 接口来管理资源。
关于此任务
WSDM 应用程序安装为系统应用程序且缺省情况下处于已禁用状态。要使用 WSDM 功能,请本主题中的脚本来启用 WSDM。
在独立应用程序服务器环境中,系统会为每个应用程序服务器实例部署一个 WSDM 应用程序。启用 WSDM 应用程序以充当在该实例的单个 Java 虚拟机内运行的管理代码的管理客户机。
过程
示例
以下样本提供 Jython 和 Jacl 脚本,用以在环境中启用 WSDM:
- 使用 Jython:
deployment = AdminConfig.getid('/Deployment:WebSphereWSDM/') deployedObject = AdminConfig.showAttribute(deployment, 'deployedObject') targetMappings = AdminConfig.showAttribute(deployedObject, "targetMappings") mappings = targetMappings[1:len(targetMappings)-1].split(" ") for target in mappings: AdminConfig.modify(target, '[[enable true]]') AdminConfig.save() - 使用 Jacl:
set deployment [$AdminConfig getid /Deployment:WebSphereWSDM] set deployedObject [$AdminConfig showAttribute $deployment deployedObject] set targetMappings [lindex [$AdminConfig showAttribute $deployedObject targetMappings] 0] $AdminConfig modify $targetMappings {{enable true}} $AdminConfig save
任务主题