Sun Cluster Data Service for WebLogic Server Guide for Solaris OS

Alternate Sun Cluster HA for BEA WebLogic Server Configurations

The installation, registration, and configuration procedures in this chapter assume that you are installing the configuration that is described in Simple Configuration. This section provides examples of other possible Sun Cluster HA for BEA WebLogic Server configurations.

Creating a Simple BEA WebLogic Server Resource

This configuration assumes that the START script, startWebLogic.sh, can start the BEA WebLogic Server without any arguments to the script. The user name and password that are needed to start the BEA WebLogic Server can be configured within this START script or in the boot.properties file.


# clresource create -g bea-rg -t SUNW.wls \
-p Confdir_list=/global/bea/beahome/weblogic700 \
-p Server_url=http://logical_host1:7001 \
-p Start_script=/global/bea/beahome/user_projects/petstore/startWebLogic.sh bea-rs

The resource is created in the enabled state.

Creating a Resource With a Server Name Argument

If the BEA WebLogic Server START script startManagedWebLogic.sh uses a Managed Server name as an argument, then the extension property Server_name can be set. The START script startManagedWebLogic.sh can be used to start several Managed Servers. The ADMIN_URL must be configured within the START script. To start the BEA WebLogic Server manually, use the following commands.


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

To configure a Sun Cluster HA for BEA WebLogic Server resource whose start script takes the server name petstore1, use the following commands.


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

The resource is created in the enabled state.

To configure another Sun Cluster HA for BEA WebLogic Server resource that uses the same START script for a different server, petstore2, use the following commands.


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

The resource is created in the enabled state.

Creating a Resource That Shuts Down Smoothly

The default for the Sun Cluster HA for BEA WebLogic Server STOP method kills the BEA WebLogic Server process to shut down the instance. To enable smooth shutdown of the BEA WebLogic Server, set the Smooth_shutdown extension property to TRUE. If this extension property is enabled, the boot.properties file with valid user name and password must be present in the $DOMAIN_DIR directory. The BEA WebLogic Server variables, WLS_USER and WLS_PW do not need to be set in the START script for smooth shutdown. This waiver applies only to BEA WebLogic Server 8.1 or later versions.

To configure a resource which will shut down smoothly, use the following commands.


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

The resource is created in the enabled state.

Creating a Resource That Probes the Database

The Sun Cluster HA for BEA WebLogic Server does not probe the database health. If the database is down when Sun Cluster HA for BEA WebLogic Server starts, the data service fails to start. To have the Sun Cluster HA for BEA WebLogic Server probe the database, supply your own database probe script to Sun Cluster HA for BEA WebLogic Server as an extension property. This database probe must return zero for success and nonzero for failure.

To configure a resource with the DB_probe script extension property set, use the following commands.


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

The resource is created in the enabled state.

Creating a Resource That Monitors URIs

To enable the Sun Cluster HA for BEA WebLogic Server resource to monitor URIs that are served by the BEA WebLogic Server configured in the resource, use the following commands to set the extension property Monitor_uri_list.


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

The resource is created in the enabled state.