WebLogic Server Partners' Guide
WebLogic Server provides several techniques for starting server instances and clusters, all of which can be encapsulated in startup scripts that you install along with your configuration template. The following sections provide an overview of the techniques:
The technique that you use to start an embedded server depends on the complexity of the WebLogic Server domain that you install, the number of computers that host server instances within the domain, and the underlying operating system. Table 3-1 compares the various techniques.
In the simplest configuration of a WebLogic Server domain, all applications run on a single server instance on a single WebLogic Server host. With this simple configuration, invoking the startup scripts that WebLogic Server provides is the easiest technique for starting a server. The scripts configure an environment and start a server instance on the current WebLogic Server host. You must log on to a WebLogic Server host (either directly or by opening a shell in a remote session) to invoke these scripts.
For more information, see Using WebLogic Server Start Scripts.
Your WebLogic Server domain includes multiple server instances and you want these server instances to run on multiple WebLogic Server hosts. Such a domain can include clusters, which provide scalability and failover capabilities.
Each WebLogic Server host can run a Node Manager, which is a Java utility that can start and stop Managed Server instances on the current WebLogic Server host. Because a Node Manager can receive startup and shutdown requests from remote WebLogic Server hosts, you can create one script that invokes Node Managers running on multiple WebLogic Server hosts to start all server instances in a distributed cluster or a domain.
For more information, see Creating Scripts that Invoke Node Managers.
The Windows operating system can automatically start Windows services as part of the computer's boot up process. On a single WebLogic Server host, you can configure dependencies so that a Managed Server starts only after an Administration Server starts. However, you cannot configure a dependency between Windows services that run on different computers.
For more information, see Creating Windows Services for Instances of WebLogic Server.
WebLogic Server provides a layered set of scripts that set environment variables and configure a Java command. The Java command invokes the
weblogic.Server class, which is the main class for a server instance.
When you install the WebLogic Server software, the installation includes the
commEnv.cmd on Windows) script. This script sets environment variables that define defaults for all WebLogic software on the current host. It defines the following:
WEBLOGIC_CLASSPATHvariable in this script.
commEnv.cmdon Windows) script.
The Configuration Wizard is a Java application that you use to create and configure domains. The Configuration Wizard prompts you to choose a domain configuration template to provide the basic structure for a domain.
For example, if you create a domain based on the Basic WebLogic Server Domain template, and if you accept all default values, the Configuration Wizard creates the following scripts in
BEA_HOME is the BEA home directory:
startWebLogic.cmdon Windows), which starts Administration Server. The script calls the
VMOptionsscripts to set environment variables. Then it sets values of domain-specific variables and invokes the
weblogic.Adminclass. You can configure this script to override some or all of the values that the
startManagedWebLogic.cmdon Windows), which starts Managed Servers. You can use this one script to start multiple Managed Servers by passing parameters when you invoke the script, or you can configure this script to start a single Managed Server. For more information, refer to "Starting Managed Servers From a WebLogic Server Script" in the Administration Console Help.
On a Windows computer, you can configure the WebLogic Server silent installer to install the Node Manager as a Windows Service. On a UNIX computer, your customers can configure the Node Manager to run as a daemon.
For more information, see in "Configuring, Starting, and Stopping Node Manager" Configuring and Managing WebLogic Server.
startWebLogic.shscript that the Configuration Wizard creates.
commEnv.cmdon Windows). This script sets environment variables that the
java weblogic.Admin STARTor
STARTINSTANDBYcommand for each server instance in the domain. If your domain includes a cluster, your script can invoke the
java weblogic.Admin STARTCLUSTERcommand.
For more information, refer to "weblogic.Admin Command-Line Reference" in the WebLogic Server Command Line Reference.
weblogic.Admin utility connects to the Administration Server, which causes the Node Manager to start the specified Managed Servers on the machines that you specified in step 3.
If you want WebLogic Server instances within your domain to start automatically when you boot a Windows host computer, you can create a script that causes a WebLogic Server instance to run as a Windows service. The script must invoke the WebLogic Server
beasvc utility, which creates a key in the Windows Registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. The registry entry contains such information as the name of the server and other startup arguments.
Neither the WebLogic Server installation program nor the Configuration Wizard can configure servers as Windows services when run in silent mode. Instead, you create a script that invokes the WebLogic Server
If you want to install an Administration Server and one or more Managed Servers as Windows services on the same WebLogic Server host, your script should include a Java option that specifies how the Managed Server connects to the Administration Server and a
beasvc option that configures dependencies between the Windows services. The Administration Server must complete its startup cycle before any Managed Servers start.
For more information, refer to "Setting Up a WebLogic Server Instance as a Windows Service" in Configuring and Managing WebLogic Server.