Java 2 Platform, Standard Edition 環境のリモート側での wsadmin ツールの実行

シン管理クライアントは、IBM® Developer Kits For the Java Platform で使用できる管理クライアント機能をサポートする Java™ アーカイブ (JAR) ファイルを追加します。

このタスクについて

重要: 以下の制限事項に注意してください。
  • シン管理クライアントを -conntype NONE オプションを指定して実行することはできません。
  • Administration Thin Client は IBM SDK 用にサポートされています。 Administration Thin Client は、クライアント管理アプリケーションが SOAP コネクターのみを使用するという条件を満たす場合、 同じメジャー・バージョンの対応する Java Development Kit (JDK) 用にも サポートされます。
  • クライアント管理アプリケーションは、com.ibm.websphere.management.AdminClientFactory API を 使用して JMX クライアントを取得しなければなりません。
  • シン管理クライアントは、SAR ファイルのインストールや、外部 JACC プロバイダー (例えば Tivoli® Access Manager) を使用するアプリケーションの編集をサポートしていません。
  • [z/OS]z/OS® 上のシン管理クライアントは、localcomm を使用しません。
  • シン管理クライアントは、SAR ファイルのインストールや、外部 JACC プロバイダー (例えば Tivoli Access Manager) を使用するアプリケーションの編集をサポートしていません。

シン管理クライアントの情報のトレースとロギングについては、の『クライアントおよびスタンドアロン・アプリケーションでのトレースの使用可能化』のトピックを参照してください。

手順

  1. WebSphere® Application Server Network Deployment インストールから、セキュリティーが有効な場合に必要なシン管理クライアント JAR ファイルおよびその他の必要なファイルを入手します。 このタスクを実行するために必要なファイルについて詳しくは、『Administration Thin Client の使用』トピックを参照してください。
  2. サーバー・マシンから wsadmin.sh または wsadmin.bat ファイルを生成します。
  3. サーバー・インストールの Java ディレクトリーをシン・クライアント環境にコピーします。
  4. OSGi 以外の環境で wsadmin ツールを開始します。 wsadmin.bat ファイルおよび wsadmin.sh ファイルの例を以下に示します。

    例: wsadmin.bat

    @REM wsadmin launcher
    @echo off
    @REM Usage: wsadmin arguments setlocal
    @REM was home should point to whatever directory you decide for your thin client environment
    
    set WAS_HOME=c:¥MyThinClient
    set USER_INSTALL_ROOT=%WAS_HOME%
    
    @REM Java home should point to where you installed java for your thinclient 
    set JAVA_HOME="%WAS_HOME%¥java"
    set WAS_LOGGING=-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Djava.util.logging.configureByServer=true
    set THIN_CLIENT=-Dcom.ibm.websphere.thinclient=true
    
    if exist "%JAVA_HOME%¥bin¥java.exe" (
        set JAVA_EXE="%JAVA_HOME%¥bin¥java" ) 
     else ( 
        set JAVA_EXE="%JAVA_HOME%¥jre¥bin¥java" )  
    
    @REM CONSOLE_ENCODING controls the output encoding used for stdout/stderr
    @REM console - encoding is correct for a console window
    @REM file - encoding is the default file encoding for the system
    @REM other - the specified encoding is used.  e.g. Cp1252, Cp850, SJIS
    @REM SET CONSOLE_ENCODING=-Dws.output.encoding=console
    @REM For debugging the utility itself
    @REM set WAS_DEBUG=-Djava.compiler=NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777
    
    set CLIENTSOAP=-Dcom.ibm.SOAP.ConfigURL=file:"%USER_INSTALL_ROOT%"¥properties¥soap.client.props
    set CLIENTSAS=-Dcom.ibm.CORBA.ConfigURL=file:"%USER_INSTALL_ROOT%"¥properties¥sas.client.props
    set CLIENTSSL=-Dcom.ibm.SSL.ConfigURL=file:"%USER_INSTALL_ROOT%"¥properties¥ssl.client.props
    set CLIENTIPC=-Dcom.ibm.IPC.ConfigURL=file:"%USER_INSTALL_ROOT%"¥properties¥ipc.client.props
    set JAASSOAP=-Djava.security.auth.login.config=%USER_INSTALL_ROOT%¥properties¥wsjaas_client.conf
    
    
    @REM the following are wsadmin property 
    @REM you need to change the value to enabled to turn on trace
    set wsadminTraceString=-Dcom.ibm.ws.scripting.traceString=com.ibm.*=all=disabled
    set wsadminTraceFile=-Dcom.ibm.ws.scripting.traceFile="%USER_INSTALL_ROOT%"¥logs¥wsadmin.traceout
    set wsadminValOut=-Dcom.ibm.ws.scripting.validationOutput="%USER_INSTALL_ROOT%"¥logs¥wsadmin.valout
    
    @REM this will be the server host that you will connecting to
    set wsadminHost=-Dcom.ibm.ws.scripting.host=myhost.austin.ibm.com
    
    @REM you need to make sure the port number is the server SOAP port number you want to connect to, in this example the server SOAP port is 8887
    set wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=SOAP
    set wsadminPort=-Dcom.ibm.ws.scripting.port=8887
    
    @REM you need to make sure the port number is the server RMI port number you want to connect to, in this example the server RMI Port is 2815
    @REM set wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=RMI
    @REM set wsadminPort=-Dcom.ibm.ws.scripting.port=2815
    
    @REM you need to make sure the port number is the server JSR160RMI port number you want to connect to, in this example the server JSR160RMI Port is 2815
    @REM set wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=JSR160RMI
    @REM set wsadminPort=-Dcom.ibm.ws.scripting.port=2815
    
    @REM you need to make sure the port number is the server IPC port number you want to connect to, in this example the server IPC Port is 9632 and the host for IPC should be localhost
    @REM set wsadminHost=-Dcom.ibm.ws.scripting.ipchost=localhost
    @REM set wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=IPC
    @REM set wsadminPort=-Dcom.ibm.ws.scripting.port=9632
    
    @REM specify what language you want to use with wsadmin
    set wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jacl
    @REM set wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jython
    
    set SHELL=com.ibm.ws.scripting.WasxShell
    
    :prop set WSADMIN_PROPERTIES_PROP= 
    if not defined WSADMIN_PROPERTIES goto workspace
    set WSADMIN_PROPERTIES_PROP="-Dcom.ibm.ws.scripting.wsadminprops=%WSADMIN_PROPERTIES%"
    
    :workspace set WORKSPACE_PROPERTIES= 
    if not defined CONFIG_CONSISTENCY_CHECK goto loop
    set WORKSPACE_PROPERTIES="-Dconfig_consistency_check=%CONFIG_CONSISTENCY_CHECK%"
    
    :loop
    if '%1'=='-javaoption' goto javaoption
    if '%1'=='' goto runcmd
    goto nonjavaoption
    
    :javaoption
    shift
    set javaoption=%javaoption% %1
    goto again
    
    :nonjavaoption
    set nonjavaoption=%nonjavaoption% %1
    
    :again
    shift
    goto loop
    
    :runcmd
    
    set C_PATH="%WAS_HOME%\properties;%WAS_HOME%\com.ibm.ws.admin.client_9.0.jar;%WAS_HOME%\com.ibm.ws.security.crypto.jar" 
    
    set PERFJAVAOPTION=-Xms256m -Xmx256m -Xj9 -Xquickstart
    
    if "%JAASSOAP%"=="" set JAASSOAP=-Djaassoap=off
    
    "%JAVA_EXE%" %PERFJAVAOPTION% %WAS_LOGGING% %javaoption% %CONSOLE_ENCODING% %WAS_DEBUG% "%THIN_CLIENT%" "%JAASSOAP%" "%CLIENTSOAP%" "%CLIENTSAS%" "%CLIENTIPC%" "%CLIENTSSL%" %WSADMIN_PROPERTIES_PROP% %WORKSPACE_PROPERTIES% "-Duser.install.root=%USER_INSTALL_ROOT%" "-Dwas.install.root=%WAS_HOME%" %wsadminTraceFile% %wsadminTraceString% %wsadminValOut% %wsadminHost% %wsadminConnType% %wsadminPort% %wsadminLang% -classpath %C_PATH% com.ibm.ws.scripting.WasxShell %*  
    
    set RC=%ERRORLEVEL%
    
    goto END
    
    :END
    
    @endlocal
    set MYERRORLEVEL=%ERRORLEVEL% if defined PROFILE_CONFIG_ACTION exit %MYERRORLEVEL% else exit /b %MYERRORLEVEL%

    例: wsadmin.sh

    #!/bin/bash
    # example wsadmin launcher
    # WAS_HOME should point to the directory for the thin client
    
    WAS_HOME="/MyThinClient"
    USER_INSTALL_ROOT="/MyThinClient"
    
    # JAVA_HOME should point to where java is installed for the thin client
    JAVA_HOME="$WAS_HOME/java"
    
    WAS_LOGGING="-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Djava.util.logging.configureByServer=true"
    
    if [[ -f ${JAVA_HOME}/bin/java ]]; then
       JAVA_EXE="${JAVA_HOME}/bin/java"
    else
       JAVA_EXE="${JAVA_HOME}/jre/bin/java"
    fi
    
    # For debugging the utility itself
    # WAS_DEBUG=-Djava.compiler="NONE -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"
    
    CLIENTSOAP="-Dcom.ibm.SOAP.ConfigURL=file:${USER_INSTALL_ROOT}/properties/soap.client.props"
    CLIENTSAS="-Dcom.ibm.CORBA.ConfigURL=file:${USER_INSTALL_ROOT}/properties/sas.client.props"
    CLIENTSSL="-Dcom.ibm.SSL.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ssl.client.props"
    CLIENTIPC="-Dcom.ibm.IPC.ConfigURL=file:${USER_INSTALL_ROOT}/properties/ipc.client.props"
    
    # the following are wsadmin property
    # you need to change the value to enabled to turn on trace
    wsadminTraceString=-Dcom.ibm.ws.scripting.traceString=com.ibm.*=all=enabled
    wsadminTraceFile=-Dcom.ibm.ws.scripting.traceFile=${USER_INSTALL_ROOT}/logs/wsadmin.traceout
    wsadminValOut=-Dcom.ibm.ws.scripting.validationOutput=${USER_INSTALL_ROOT}/logs/wsadmin.valout
    
    # this will be the server host that you will be connecting to
    wsadminHost=-Dcom.ibm.ws.scripting.host=myhost.austin.ibm.com
    
    # you need to make sure the port number is the server SOAP port number you want to connect to, in this example the server SOAP port is 8875
    wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=SOAP
    wsadminPort=-Dcom.ibm.ws.scripting.port=8875
    
    # you need to make sure the port number is the server RMI port number you want to connect to, in this example the server RMI port is 2811
    #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=RMI
    #wsadminPort=-Dcom.ibm.ws.scripting.port=2811
    
    # you need to make sure the port number is the server JSR160RMI port number you want to connect to, in this example the server JSR160RMI port is 2811
    #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=JSR160RMI
    #wsadminPort=-Dcom.ibm.ws.scripting.port=2811
    
    # you need to make sure the port number is the server IPC port number you want to connect to, in this example the server IPC port is 9630
    #wsadminHost=-Dcom.ibm.ws.scripting.ipchost=localhost
    #wsadminConnType=-Dcom.ibm.ws.scripting.connectionType=IPC
    #wsadminPort=-Dcom.ibm.ws.scripting.port=9630
    
    # specify what language you want to use with wsadmin
    wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jacl
    #wsadminLang=-Dcom.ibm.ws.scripting.defaultLang=jython
    
    SHELL=com.ibm.ws.scripting.WasxShell
    
    # If wsadmin properties is set, use it
    if [[ -n "${WSADMIN_PROPERTIES+V}" ]]; then
         WSADMIN_PROPERTIES_PROP="-Dcom.ibm.ws.scripting.wsadminprops=${WSADMIN_PROPERTIES}"
    else
         # Not set, do not use it
         WSADMIN_PROPERTIES_PROP=
    fi
    
    # If config consistency check is set, use it
    if [[ -n "${CONFIG_CONSISTENCY_CHECK+V}" ]]; then
         WORKSPACE_PROPERTIES="-Dconfig_consistency_check=${CONFIG_CONSISTENCY_CHECK}"
    else
         WORKSPACE_PROPERTIES=
    fi
    
    
    # Parse the input arguments
    isJavaOption=false
    nonJavaOptionCount=1
    for option in "$@" ; do
      if [ "$option" = "-javaoption" ] ; then
         isJavaOption=true
      else
         if [ "$isJavaOption" = "true" ] ; then
            javaOption="$javaOption $option"
            isJavaOption=false
         else
            nonJavaOption[$nonJavaOptionCount]="$option"
            nonJavaOptionCount=$((nonJavaOptionCount+1))
         fi
      fi
    done
    
    DELIM=" "
    C_PATH="${WAS_HOME}/properties:${WAS_HOME}/com.ibm.ws.admin.client_9.0.jar:${WAS_HOME}/com.ibm.ws.security.crypto.jar"
    
    #Platform specific args...
    PLATFORM=`/bin/uname`
    case $PLATFORM in
      AIX | Linux | SunOS | HP-UX)
        CONSOLE_ENCODING=-Dws.output.encoding=console ;;
      OS/390)
        CONSOLE_ENCODING=-Dfile.encoding=ISO8859-1
        EXTRA_X_ARGS="-Xnoargsconversion" ;;
    esac
    
    # Set java options for performance
    PLATFORM=`/bin/uname`
    case $PLATFORM in
      AIX)
          PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xquickstart" ;;
      Linux)
          PERF_JVM_OPTIONS="-Xms256m -Xmx256m -Xj9 -Xquickstart" ;;
      SunOS)
          PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=40m" ;;
      HP-UX)
          PERF_JVM_OPTIONS="-Xms256m -Xmx256m -XX:PermSize=40m" ;;
      OS/390)
          PERF_JVM_OPTIONS="-Xms256m -Xmx256m" ;;
    esac
    
    if [[ -z "${JAASSOAP}" ]]; then
         JAASSOAP="-Djaassoap=off"
    fi
    
    "${JAVA_EXE}" ¥
        ${PERFJAVAOPTION} ¥
        ${EXTRA_X_ARGS} ¥
        -Dws.ext.dirs="$WAS_EXT_DIRS" ¥
        ${EXTRA_D_ARGS} ¥
        ${WAS_LOGGING} ¥
        ${javaoption} ¥
        ${CONSOLE_ENCODING} ¥
        ${WAS_DEBUG} ¥
        "${CLIENTSOAP}" ¥
        "${JAASSOAP}" ¥
        "${CLIENTSAS}" ¥
        "${CLIENTSSL}" ¥
        "${CLIENTIPC}" ¥
        ${WSADMIN_PROPERTIES_PROP} ¥
        ${WORKSPACE_PROPERTIES} ¥
        "-Duser.install.root=${USER_INSTALL_ROOT}" ¥
        "-Dwas.install.root=${WAS_HOME}" ¥
        "-Dcom.ibm.websphere.thinclient=true" ¥
        [z/OS]"-Djava.security.properties=${WAS_HOME}/properties/java.security" ¥
        ${wsadminTraceFile} ¥
        ${wsadminTraceString} ¥
        ${wsadminValOut} ¥
        ${wsadminHost} ¥
        ${wsadminConnType} ¥
        ${wsadminPort} ¥
        ${wsadminLang} ¥
        -classpath ¥
        "${C_PATH}" ¥
        com.ibm.ws.scripting.WasxShell ¥
        "${nonJavaOption[@]}"
    
    exit $?
  5. [z/OS]z/OS 環境の場合、wsadmin.sh スクリプトには、ステップ 4 で示した wsadmin.bat の例で指定したすべてのプロパティーが含まれている必要があります。

    %JAVA_EXE%  -classpath "%C_PATH%" 
    -Dcom.ibm.websphere.thinclient=true 
    -Duser.install.root=%USER_INSTALL_ROOT% -
    Dcom.ibm.SSL.ConfigURL=file:%WAS_HOME%/properties/ssl.client.props %SOAPURL% your_class_file
    
    ${JAVA_EXE}  -classpath "${C_PATH}" 
    -Dcom.ibm.websphere.thinclient=true
     -Duser.install.root=${USER_INSTALL_ROOT}
     -Dcom.ibm.SSL.ConfigURL=file:${WAS_HOME}/properties/ssl.client.props ${SOAPURL} your_class_file

トピックのタイプを示すアイコン タスク・トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_j2se
ファイル名:txml_j2se.html