Startup Methods for WebLogic Server in Windows 2000


Startup Methods for WebLogic Server in Windows 2000

There are three methods that you can use to start WebLogic Server in a Windows 2000 environment as follows :

  1. Choose Start, Programs, BEA WebLogic Platform, WebLogic Server 7.0, User Projects, myDomain, Start myserver . (This option is only applicable if you chose to create a Windows Start Menu entry using the Configuration Wizard.)

    This menu-driven method is a shortcut to executing a start script, which is located in the root of a domain directory.

  2. Execute the startWebLogic.cmd script file located in the root of your domain directory.

  3. Execute the weblogic.Server class directly using the java command. This is the method the other methods ultimately execute without having to type the entire syntax on the command line.

Each of these methods will start WebLogic Server. However, if there is one method you should become extremely familiar with, it should be the one that uses the startWebLogic script, for the following reasons:

  • You may be asked to install and start WebLogic Server in multiple environments, not only Windows 2000.

  • Understanding the startWebLogic script enables you to understand the start-up mechanism of WebLogic Server, which is very important from an administration standpoint.

  • The startWebLogic script is a start-up mechanism that you can easily modify and re-use for all your domains.

  • You can version control your start-up mechanism for each of your domains.

  • Typing the command-line syntax using the java command is a very cumbersome and time-consuming effort, especially if you have to remember the start up options for the JVM as well as your domains.

The startWebLogic Script File

The startWebLogic file is a text-based script file that provides an easy mechanism for starting an instance of WebLogic Server. The contents of the startWebLogic script enable you to specify the environmental configurations you need to support the execution of your J2EE applications. By default the startWebLogic script is located in the root of your domain directories, for example in your myDomain directory:

 
  BEA_HOME\WL_HOME  \  user_projects  \myDomain 

You should not modify this file because it serves as a template startup script for future WebLogic Servers you may want to create manually. This script by default starts WebLogic Server as an Administration Server. There is a separate script, the startManagedWebLogic file, for which you can use a template for starting Managed Servers. When you create your own WebLogic Servers, you may want to consider renaming the startWebLogic file using the following naming convention:

 
 Start  Domain  [Managed].cmd 

where:

  • Domain specifies the name of the WebLogic Server domain.

  • Managed specifies WebLogic Server will be a Managed Server (Optional).

If you have installed the Pet Store and Examples sample applications, their specific startup scripts are named startPetStore.cmd and startExamplesServer.cmd respectively and are located under their own domain directories in the following location:

BEA_HOME\WL_HOME \samples\server\config

Because the startWebLogic script is a text file, you can review its content through any text editor, such as Notepad or Wordpad. The important configuration variables stored in the startWebLogic script file you should become familiar with are described in Table 10.5.

Table 10.5. The startWebLogic Variables

startWebLogic Variable

Description

WLS_USER

Sets the system administration username to start WebLogic Server.

WLS_PW

Sets the system administration password to start WebLogic Server. WebLogic Server will prompt you to enter the administration credentials upon startup. If you enter the appropriate WLS_USER and WLS_PW values, you can bypass this prompt. However, for security reasons, because the WLS_USER and WLS_PW values are viewable by anyone viewing the startup script file, BEA recommends you use a boot identify file, which contains the respective username and password values in an encrypted format.

The boot identity file is discussed later in this chapter in the "Bypassing the Username and Password Prompt Using the Boot Identity File" section.

STARTMODE

Sets the start mode of the WebLogic Server. Set to true for production and false for development.

JAVA_OPTIONS

Java command-line options for configuring the JVM which will run WebLogic Server.

JAVA_VM

Specifies the mode of the Hotspot JVM. The options are:

-server

-classic

-hotspot (Windows only)

MEM_ARGS

A variable to override the default minimum (-Xms200m) and maximum (-Xmx200m) values (specified in megabytes) for the heap memory of the JVM.

It is recommended the minimum and maximum values should be sized the same to avoid the JVM dynamically resizing the heap.

DOMAIN_NAME

Specifies the domain where WebLogic Server resides.

SERVER_NAME

The name of the WebLogic Server to start. The default is named myserver.

JAVA_HOME

The location of the JVM that will be used to execute the weblogic.server class (WebLogic Server).

CLASSPATH

Specifies additional directory or class file listings for the CLASSPATH environment variable.

After the domain startWeblogic script file is executed, the configuration information contained within the file is passed to a master startWLS .cmd script, which is located within the BEA_HOME\weblogic70\server\bin directory. This master startWLS script sets the variables related to the location of the root directory of your WebLogic installation and the root directory of JDK installation, and then starts WebLogic Server using the following Java command syntax to execute the weblogic.server class:

 
 java RequiredArguments [OptionalArguments] weblogic.Server 

The RequiredArguments and OptionalArguments are configuration information supplied by your domain and master startWeblogic script files.

Important startWebLogic Script Options

All WebLogic-specific information uses the following syntax:

  • WebLogic-specific:

     
     -Dweblogic.attribute=value 
  • Java-specific:

     
     -Djava.attribute=value 

These options are tagged to the end of the JAVA_VM and MEM_ARGS variables.

From a WebLogic Server practitioner's perspective, all startWebLogic script options and their respective values are important to the optimal operation of WebLogic Server. However, if you are just in the learning phases, there are three options with which you should immediately become familiar. The following sections describe these options and their preferred initial values.

Dweblogic.management.discover

Because you will be initially running all your default and sample WebLogic Servers as Administration Servers, this option prevents an Administration Server from discovering Managed Servers on your network. Unless you have a Managed Server WebLogic Server environment, placing an Administration Server in Discovery mode will place an unnecessary overhead (detection and connection processes) on your system, hence slowing it down quite considerably. By default this option is set to true (Discovery Mode). You can switch the Discovery mode off by using the following statement in your startWebLogic script:

 
 JAVA_OPTIONS=-Dweblogic.management.discover=false 
Dweblogic.ProductionModeEnabled

It is assumed you will initially be using your WebLogic Server for development purposes. If this assumption is true, you will also want WebLogic Server to auto deploy your J2EE applications or any modifications to them. In order for WebLogic Administration Server to provide this capability, it must be placed into Development mode, which starts a poll process that will detect changes in your application's directory in your active domain. By default, this option is set to true, implying the WebLogic Administration Server is in Production mode, which does not provide any auto-deploy capabilities for production control reasons. You can place your WebLogic Administration Server in Development mode by using the following statement in your startWebLogic script:

 
 JAVA_OPTIONS=-Dweblogic.ProductionModeEnabled-false 
-Xms and -Xmx

By default the minimum ( -Xms ) and maximum ( -Xmx ) values for the heap memory of your JVM are set to 200MB. If you are using a system that is constrained for memory, you should consider reducing these settings to an acceptable value that does not cause your system as a whole to slow down. For example, you can set these options to 100MB by using the following statement in your startWebLogic script:

 
 MEM_ARGS=-Xms100m -Xmx100m 


BEA WebLogic Platform 7
BEA WebLogic Platform 7
ISBN: 0789727129
EAN: 2147483647
Year: 2003
Pages: 360

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