Enabling WSDM using wsadmin scripting

Use the wsadmin tool with the AdminConfig object to enable Web Services Distributed Management (WSDM) in your environment. WSDM is an OASIS approved standard that supports managing resources through a standardized web service interface.

About this task

The WSDM application is installed as a system application and is disabled by default. In order to use the WSDM functionality, use the script in this topic to enable WSDM.

In a multinode environment, the management code runs across a distributed network of Java virtual machines with a central access point as the deployment manager process for the entire network or cell. Enable WSDM on the deployment manager to manage Java virtual machines within a cell. The WSDM application acts as an administrative client to the managed application server. You can manage the WSDM application from the application server on which it is deployed only.

Procedure

  1. Launch a scripting command. To learn more, see the starting the wsadmin scripting client information.
  2. Determine the configuration ID of the WSDM application.
    Use the getid option for the AdminConfig object to retrieve the configuration ID and set the value to the deployment variable, as the following example demonstrates:
    deployment = AdminConfig.getid('/Deployment:WebSphereWSDM/')
  3. Determine the deployed object of the WSDM configuration ID.
    Use the showAttribute option for the AdminConfig object to retrieve the deployedObject attribute and set the value to the deployedObject variable, as the following example demonstrates:
    deployedObject = AdminConfig.showAttribute(deployment, 'deployedObject')
  4. Determine the target mappings for the WSDM deployed object.
    Use the showAttribute option for the AdminConfig object to retrieve the targetMappings attribute and set the value to the targetMappings variable, as the following example demonstrates:
    targetMappings = AdminConfig.showAttribute(deployedObject, "targetMappings")
  5. Enable WSDM.
    Assign each mapping to the target variable, then set the enable attribute to true in the target mapping, as the following example demonstrates:
    mappings = targetMappings[1:len(targetMappings)-1].split(" ")
    AdminConfig.modify(target, '[[enable true]]')
  6. Save the configuration changes.
    請利用下列指令範例來儲存您的配置變更:
    AdminConfig.save()

Example

The following samples provide Jython and Jacl scripts that enable WSDM in your environment:
  • Using 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()
  • Using 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

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



時間戳記圖示 前次更新: July 9, 2016 11:18
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_7wsdm
檔名:txml_7wsdm.html