この JACL スクリプトを実行して、Integrated Solutions Console 内でデプロイされたコンソール・モジュールのクラス・ローダー配列を変更します。
このタスクについて
以下の JACL スクリプトは、Integrated Solutions Console 内でデプロイされたコンソール・モジュールのクラス・ローダー配列を変更する方法の例として役立ちます。
JYTHON など他のスクリプト記述タイプでも使用できます。
手順
- 以下のスクリプトをファイルにコピーします。
set app [$AdminConfig getid /Deployment:isclite/]
set webModules [$AdminConfig list WebModuleDeployment $app]
foreach webModule $webModules {
set uri [$AdminConfig showAttribute $webModule uri]
if {$uri == "<WAR_NAME>"} {
#modify the classloader for <WAR_NAME>
set cl [$AdminConfig list Classloader $webModule]
# check if the classloader exist
if {$cl == ""} {
# create a new one with the appropriate mode
$AdminConfig create Classloader $webModule {{mode <MODE>}}
} else {
#modify the existing one
$AdminConfig modify $cl {{mode <MODE>}}
}
}
}
# save the configuration change
$AdminConfig save
- このサンプルの 2 行の <WAR_NAME> を、
変更したいクラス・ローダー配列の Integrated Solutions Console 内でデプロイされた
コンソール・モジュール・ファイルの名前に変更します。
- このサンプルの 2 行にある <MODE> を、必要に応じて PARENT_LAST または
PARENT_FIRST に変更します。
- 例えば、ファイル名 classloaderorder.jacl を使用して任意のディレクトリーにこのファイルを保管します。
- <WAS-install>/profiles/<profile_name>/bin ディレクトリーから wsadmin スクリプト・
クライアントを開始します。
- 以下のコマンドを発行します。
wsadmin -f <path to jacl file>/classloader.jacl