Scripted Start

Unix/Linux installations do not provide a GUI application for starting WebLogic. Instead, two scripts are provided in a directory called "config" under the directory that you specified in the installation as the home directory for WebLogic. In my particular case, that is

 /BEA/wlserver6.1/config/mydomain 

The scripts are:

startWebLogic.sh

Start WebLogic as an administration server.

startManagedWebLogic.sh

Start WebLogic as a managed server.

There's nothing particularly exotic about these scripts. First they set a bunch of environment variables that describe the location of Java and BEA products on your system. These include:

JAVA_HOME

The home directory of the Java installation on your server.

WL_HOME

The home directory of the WebLogic installation on your server.

Both of those are fairly self-explanatory. One slight caveat is that if you have multiple Java instances in your environment, the JAVA_HOME variable should always point to the home directory of the Java development kit that BEA used during the installation. Depending on your platform, you may also see environment variables corresponding to the location of shared library files.

WLS_PW

Perhaps the most interesting environment variable is WLS_PW. If set, this contains the password that is normally typed in by hand when the server is started. By default, it is left blank. When set, you can perform a totally automated startup of the server when the host machine is rebooted. This must be balanced against the security risk of storing an unencrypted password on your system.

Java Command Line

The heart of the script is, of course, the Java command line that starts WebLogic server. The exact appearance of this command line varies slightly depending on your platform, but the one below, which starts an administration server on a Windows-NT platform, is illustrative :

 %JAVA_HOME%\bin\java" -hotspot -ms64m -mx64m    -classpath "%CLASSPATH%"    -Dweblogic.Domain=PH-domain    -Dweblogic.Name=NT4-server "-Dbea.home=C:\bea"    -Dweblogic.management.password=%WLS_PW%    -Dweblogic.ProductionModeEnabled=%STARTMODE%    "-Djava.security.policy=       =C:\bea\wlserver6.1/lib/weblogic.policy"    weblogic.Server 

If, as in the case of new installations, the server you are starting is the only one in the domain, it must be started as an Administration server. If you are configuring a new server installation that you plan to add to a domain as a Managed server, it is permissible to start it as a Managed server to do the initial configuration.

The script for starting a Managed server is very similar. Again we see environment variables set for the Java class path , the home directory for WebLogic server, and the (possibly distinct) BEA home directory. The main difference between the Managed server startup script and the Administration server startup script is in the Java command line that actually starts the server.

The command-line options are discussed in more detail below. For the moment, just notice that the Managed server instance is started with a parameter (printed in bold) telling it where to find the Administration server that will be its boss.

 java $JAVA_OPTIONS    -classpath $CLASSPATH   -Dweblogic.Domain=PH-domain   -Dweblogic.Name=$SERVER_NAME  -Dweblogic.management.server  =  $ADMIN_URL  -Dbea.home=/home/bea   -Dweblogic.management.password=$WLS_PW   -Dweblogic.ProductionModeEnabled=$STARTMODE   -Djava.security.policy=      =$WL_HOME/lib/weblogic.policy    weblogic.Server 

If there is an Administration server already running in that domain, the server must be started as a Managed server.

The scripts will prompt you for a password before they start the server, unless you have configured the WLS_PW variable in the script. Once the server is started, you access the console by pointing your browser to the following URI:

http://127.0.0.1:7001/console



BEA WebLogic Server Administration Kit
BEA WebLogic Server Administration Kit (Prentice Hall PTR Advanced Web Development)
ISBN: 0130463868
EAN: 2147483647
Year: 2002
Pages: 134
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net