Sun Cluster Data Service for WebLogic Server ガイド (Solaris OS 版)

Sun Cluster HA for BEA WebLogic Server の代替構成

この章で解説するインストール、登録、および構成手順では、「シンプルな構成」 の解説に従い、シンプル構成をインストールすることを想定しています。この節では、Sun Cluster HA for BEA WebLogic Server で選択できるほかの構成例を示します。

シンプルな BEA WebLogic Server リソースを作成する

この構成では、START スクリプト startWebLogic.sh が、引数の指定なしに BEA WebLogic Server を起動できることが前提となります。BEA WebLogic Server の起動に必要な usernamepassword は、START スクリプト内または boot.properties ファイルに設定することができます。


# scrgadm -a -j bea-rs -t SUNW.wls- -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh

サーバー名を引数にするリソースを作成する

BEA WebLogic Server の START スクリプト startManagedWebLogic.sh が Managed Server 名を引数として使用する場合、拡張プロパティ Server_name を設定できます。START スクリプト startManagedWebLogic.sh は、複数の Managed Server の起動に使用できます。この START スクリプトには ADMIN_URL を設定する必要があります。BEA WebLogic Server を手動で起動するには、以下のコマンドを使用します。


cluster-node-1> cd /global/wls/user_projects/petstore
cluster-node-1> ./startManagedWebLogic.sh petstore1

start スクリプトがサーバー名 petstore1 を受け付ける Sun Cluster HA for BEA WebLogic Server リソースを構成するには、以下のコマンドを使用します。


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh\
-x Server_name=petstore1

異なるサーバー petstore2 に同じ START スクリプトを使用する別の Sun Cluster HA for BEA WebLogic Server リソースを構成するには、以下のコマンドを使用します。


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh\
-x Server_name=petstore2

スムーズにシャットダウンするリソースを作成する

Sun Cluster HA for BEA WebLogic Server STOP メソッドは、デフォルトでは BEA WebLogic Server のプロセスを終了してインスタンスをシャットダウンします。このような動作が望ましくない場合は、Smooth_shutdown 拡張プロパティを TRUE に設定して BEA WebLogic Server のスムーズなシャットダウンを有効にします。この拡張プロパティを有効にする場合は、WLS_USERWLS_PW を START スクリプト内に設定する必要があります。この設定ではセキュリティー上で懸念がある場合は、Sun Cluster HA for BEA WebLogic Server によりデフォルトの強制的なシャットダウン (プロセスの終了) を行う必要があります。

スムーズにシャットダウンするリソースを構成するには、以下のコマンドを使用します。


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh\
-x Server_name=petstore1\
-x Smooth_shutdown=TRUE

データベースの検証を行うリソースを作成する

Sun Cluster HA for BEA WebLogic Server はデータベースの状態を検査しません。Sun Cluster HA for BEA WebLogic Server の起動時にデータベースが停止していると、データサービスは開始されません。Sun Cluster HA for BEA WebLogic Server によってデータベースを検査したい場合は、独自のデータベース検証スクリプトを拡張プロパティとして Sun Cluster HA for BEA WebLogic Server に渡すことができます。このデータベース検証は、正常に完了した場合にゼロを、失敗時にゼロ以外を返すものでなければなりません。

スクリプト拡張プロパティ DB_probe を設定してリソースを構成するには、以下のコマンドを使用します。


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh\
-x Server_name=petstore1\
-x Smooth_shtudown=TRUE\
-x DB_probe_script=/global/bea/script/db_probe_script

URI を監視するリソースを作成する

Sun Cluster HA for BEA WebLogic Server リソース内で構成された BEA WebLogic Server のサービスを受ける URI を監視するように設定するには、以下のコマンドを使用して拡張プロパティ Monitor_uri_list を設定してください。


# scrgadm -a -j bea-rs -t SUNW.wls -g bea-rg\
-x Confdir_list=/global/bea/beahome/weblogic700\
-x Server_url=http://logical_host1:7001\
-x Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh\
-x Server_name=petstore1\
Smooth_shutdown=TRUE\
DB_probe_script=/global/bea/script/db_probe_script\
-x Monitor_uri_list=http://logical_host1:7001/petstore,http://logical_host1:7001/bookstore