Modifying the starting weight of applications using wsadmin scripting

You can use the wsadmin tool and scripting to modify the starting weight of an application.

Before you begin

wsadmin 스크립트 도구를 시작하십시오.

About this task

Attention: 애플리케이션이 실행 중인 경우, 애플리케이션 설정을 변경하면 애플리케이션이 다시 시작됩니다. 독립형 서버에서 변경사항을 저장하면 애플리케이션이 다시 시작됩니다. 여러 서버 제품에서 변경사항을 저장하면 애플리케이션이 다시 시작되고 애플리케이션이 설치된 노드에서 파일이 동기화됩니다. 여러 서버 제품에서 동기화가 발생하는 시기를 제어하려면 콘솔 환경 설정 페이지에서 노드에서 변경사항 동기화를 선택 취소하십시오.

Complete the steps in this topic to modify the starting weight of an application.

Procedure

  1. Retrieve the configuration ID of the object that you want to modify and set it to a variable.

    For example, set the configuration ID to the dep variable. In this example, the object is the deployed application MyApp.

    • Using Jacl:

      set dep [$AdminConfig getid /Deployment:MyApp/]
    • Using Jython:

      dep = AdminConfig.getid("/Deployment:MyApp/")
  2. Identify the deployed object and set it to a variable. For example:

    For example, set the deployed object to the depObject variable:

    • Using Jacl:

      set depObject [$AdminConfig showAttribute $dep deployedObject]
    • Using Jython:

      depObject = AdminConfig.showAttribute(dep, "deployedObject")
  3. Show the current attribute values of the configuration object with the show command.
    • Using Jacl:

      $AdminConfig show $depObject startingWeight

      Example output:

      {startingWeight 1}
    • Using Jython:

      AdminConfig.show(depObject, 'startingWeight')

      Example output:

      [startingWeight 1]
  4. Modify the attributes of the configuration object with the modify command.
    • Using Jacl:

      $AdminConfig modify $depObject {{startingWeight 2}}
    • Using Jython:

      AdminConfig.modify(depObject, [['startingWeight', '2']])
  5. Verify the changes that you made to the attribute value with the show command.
    • Using Jacl:

      $AdminConfig show $depObject startingWeight

      Example output:

      {startingWeight 2}
    • Using Jython:

      AdminConfig.show(depObject, 'startingWeight')

      Example output:

      [startingWeight 2]
  6. Save the configuration changes.
    다음 명령 예제를 사용하여 구성 변경사항을 저장하십시오.
    AdminConfig.save()

주제 유형을 표시하는 아이콘 태스크 주제



시간소인 아이콘 마지막 업데이트 날짜: July 9, 2016 6:15
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_weight
파일 이름:txml_weight.html