Windows Service Start

Windows Service Start

As we discussed in Chapter 1, the preferred method for running WebLogic in a Windows environment is as a service. If you chose to install WebLogic as a service, it should always be started and stopped through the Services application in the Control Panel. (See Figure 2-2.)

Figure 2-2. Windows Service Panel

graphics/02fig02.gif

Note that the name of the service is the server name that you provided during the install process ("d1server1" in Figure 2-2) rather than "BEA WebLogic" or some variation thereof. This is done so that you can control multiple servers running on the same machine individually.

Installation

The distribution comes with a script that can be used to install WebLogic as a Windows service. In most cases the script will run without any modifications. To install WebLogic as a Windows NT service, locate and run the script:

 installNTService.cmd 

Windows will use the script startWebLogic.cmd to bring the service up. If you need to add, remove, or change any command-line options, do so in that script. (The scripted start is discussed in more detail in the next section.)

Passwords

Note that by default the installNTService script will use the system password that you entered when you installed the server. The installNTService script is created at the time WebLogic is installed. There is no mechanism for automatically updating passwords in the script or in Windows if/when they are changed in WebLogic. Lamentably, this means that if you change the password after the Windows service is installed, you will first have to uninstall the service. Take comfort in the knowledge that an uninstall script is provided for that purpose:

 uninstallNTService.cmd 

To change the password, edit the installNTService script and add the following to the end of the install command line, just after - cmdline:%CMDLINE% :

 -password:"yourpassword" 

Finally, rerun the installNTService script to reinstall with the new password.

beasvc.exe

If you examine the install and uninstall scripts mentioned above, you'll notice that the heart of each is an executable program that we've not yet talked about, beasvc.exe . The beasvc.exe program is provided to serve as an interface between WebLogic and the Windows operating systemit installs and uninstalls WebLogic as a Windows service.

As the .exe extension implies, it is a standalone executable, not a Java program. By default it is installed in the bin directory under wlserver6.1. To run it, simply call it with the absolute path :

 C:\bea\wlserver6.1\bin\beasvc.exe 

It has eight command-line options:

-help

Display a usage message.

-svcname: < name >

Specify the name by which the windows service will be known. In a one-server installation this can be something generic, like "wlserver." However, if you are planning to install more than one server instance on the Windows machine, now is your chance to choose a meaningful name by which the WebLogic servers can be distinguished.

-install

Install the service specified with -svcname.

-remove

Uninstall the service specified with -svcname.

-cmdline:"Java options"

Use a quoted string to specify the list of parameters that Windows will pass to Java when invoking WebLogic server.

-javahome:"/java/home/directory"

Use a quoted string to specify the Java home directory on this machine.

-execdir:"/weblogic/server/home"

Use a quoted string to specify the path to the WebLogic server home directory.

-extrapath:

Use a quoted string to specify parameters that you need to have prepended to the path.



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