Technical data

5 Setting Up a WebLogic Server as a Windows Service
5-2 Configuring and Managing WebLogic Server
Setting Up a Windows Service
WebLogic Server includes a master script,
WL_HOME\server\bin\installSvc.cmd, that you can use to set up a server instance
as a Windows Service. Instead of invoking the
installSvc.cmd master script
directly, create your own script that supplies values for a set of variables and then calls
the
installSvc.cmd script:
1. In the root directory for the domain’s Administration Server (the directory that
contains the domain’s
config.xml file), create a script that is similar to the one in
Listing 5-1.
Listing 5-1 Script for Setting Up a Server as a Windows Service
@rem *************************************************************************
@rem This script sets up a WebLogic Server instance as a Windows service.
@rem It sets variables to specify the domain name, server name, and optionally,
@rem user credentials, startup mode, and arguments for the JVM. Then the script
@rem calls the %WL_HOME%\server\bin\installSvc.cmd script.
@rem *************************************************************************
echo off
SETLOCAL
@rem Set DOMAIN_NAME to the name of the domain in which you have defined
@rem the server instance.
set DOMAIN_NAME=myWLSdomain
@rem Set USERDOMAIN_HOME to the root directory of the domain’s Administration
@rem Server, which is the directory that contains the domain’s config.xml file.
@rem For more information about the root directories for servers, refer to
@rem “A Server’s Root Directory” on page 2-9.
set USERDOMAIN_HOME=D:\bea\user_projects\myWLSdomain
@rem Set SERVER_NAME to the name of the existing server instance that you want
@rem set up as a Windows service.
set SERVER_NAME=myWLSserver
@rem Optional: one way of bypassing the username and password prompt during
@rem server startup is to set WLS_USER to your system username and WLS_PW to
@rem your password. The script encrypts the login credentials and stores them
@rem in the Windows registry.
@rem The disadvantage to this method is that changing the username or password