If you use some other means to create a domain (such as the Administration Console), you can create your own startup script that does the following:
1. Sets the value of a variable namedSERVER_NAME. All servers in a domain must be named. For example,
set SERVER_NAME=myserver
In the domain’sconfig.xmlfile, the name of a server is specified as<Server Name=serverName>. Make sure that the value forset SERVER_NAMErefers to the server name as specified inconfig.xml.
2. Sets values for any of the following optional variables:
Table 2-1 Optional variables
Variable Description
WLS_USER Variable for setting a cleartext user for server startup. Instead of using this variable, we recommend that you use a boot identity file. For more information, refer to“Bypassing the Prompt for Username and Password” on page 2-7.
WLS_PW Variable for setting a cleartext password for server startup. Instead of using this variable, we recommend that you use a boot identity file. For more information, refer to
“Bypassing the Prompt for Username and Password” on page 2-7.
ADMIN_URL If you specify a URL for this variable, the server will start as a Managed Server and will use the specified URL to contact its Administration Server.
For more information, refer to“The Administration Server and Managed Servers” on page 1-6.
STARTMODE Determines whether the server runs in production mode or development mode. Specify
truefor production mode servers orfalsefor development mode. For more information on using production and development modes refer to
3. Calls the master startup script,WL_HOME\server\bin\startWLS.cmd
(startWLS.shon UNIX).
The master startup script sets environment variables, such as the location of the JVM, and then starts the JVM with WebLogic Server arguments. If you are not using the JVM installed with WebLogic Server, you must edit the master start script. For more information, refer to“Using a Non-Default JVM with WebLogic Server” on page 2-15.
4. If you plan to locate your startup script outside of the domain’s root directory, your script must include the following value for theJAVA_OPTIONSvariable:
-Dweblogic.RootDirectory=path
wherepathspecifies the location of the domain’s root directory. For example,
JAVA_OPTIONS Java command-line options for running the server. The Java command-line options will be passed to the JVM after JAVA_VM and MEM_ARGS are passed.
-Dweblogic.ListenAddressis an example of a Java option that you can call from the domain start script. For more information about command-line options, refer to
“Using the weblogic.Server Command” on page 2-16.
If you are listing multiple options in a UNIX shell, put quotes around the entire set of options and include spaces between each option. For example:
JAVA_OPTIONS="-Dweblogic.attribute=value -Djava.attribute=value"
JAVA_VM Java argument that specifies the mode in which the virtual machine runs. Use one of the following options:
! -server
! -client
! -hotspot(Windows only)
If you are using a JVM that does not support any of these operational modes, you must edit the master script to prevent these arguments from being passed to the JVM. For more information, refer to“Using a Non-Default JVM with WebLogic Server” on page 2-15. MEM_ARGS Variable to override the default memory arguments passed to Java. In the master start
scripts, the options are set by default to-Xms200m and -Xmx200m.
Table 2-1 Optional variables Variable Description
Starting an Administration Server
Administration Guide 2-15
JAVA_OPTIONS=-Dweblogic.RootDirectory=c:\serverRoot
Using a Non-Default JVM with WebLogic Server
If you are not using the JVM installed with WebLogic Server, you must edit the master start script so that theJAVA_HOMEvariable specifies the correct location of the JVM on your system. In addition, if the JVM does not support an option to run in a HotSpot mode, then you must remove the%JAVA_VM%variable from the command that invokes the JVM.
If you modify theWL_HOME\server\bin\startWLS.cmd(startWLS.shon UNIX) master script to specify a different JVM, then all of the startup scripts that refer to this master script will use the non-default JVM.
To edit the master start script so that it uses a non-default JVM, do the following: 1. Create a backup copy ofWL_HOME\server\bin\startWLS.cmd(startWLS.sh
on UNIX).
2. OpenstartWLS.cmd (startWLS.shon UNIX) in a text editor.
3. Edit theset JAVA_HOMEcommand to specify the home directory of your JVM. For example,set JAVA_HOME=C:\JRockit\JRE\1.3.1
4. If the JVM does not support a HotSpot mode, remove%JAVA_VM%from the command that invokes the JVM, which is the line near the end of the file. For example, remove the bold text from the following command:
"%JAVA_HOME%\bin\java" %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Dweblogic.Name=%SERVER_NAME% -Dbea.home="C:\bea" -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server