Creating a Windows Service for Oracle WebLogic Server

Posted by Dirk Nachbar on Friday, September 17, 2010 with No comments
In case you are using the Oracle WebLogic Server under Windows, you may want to run your WebLogic Server as a Windows Service instead of all time running the provided cmd files to startup your WebLogic Server.
For this Oracle provides us a small script to create a Windows Service for our WebLogic Server, the script is located in %WL_HOME%\server\bin with the name installsvc.cmd. The best way to use this script is to build up a small wrapper script with all the necessary variable declarations and a call on the installsvc.cmd:

echo off

SETLOCAL
set DOMAIN_NAME=DemoDomain
set USERDOMAIN_HOME=D:\oracle\fmw-11.1.1\user_projects\domains\DemoDomain
set SERVER_NAME=DemoAdminServer
set PRODUCTION_MODE=true
set JAVA_VENDOR=BEA
set JAVA_HOME=D:\oracle\fmw-11.1.1\jrmc-4.0.1-1.6.0
set MEM_ARGS=-Xms256m -Xmx512m
call "D:\oracle\fmw-11.1.1\wlserver-10.3.3\server\bin\installSvc.cmd"
ENDLOCAL

Just adjust the above example to your settings and run the wrapper script, this will create you a Windows Service "beas %DOMAIN_NAME%_%SERVER_NAME%", if you dont like the naming convention for the Windows Service to be created, just edit the installsvc.cmd script. Nearly at the end you will find following line:
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%

Just adjust the option -svcname to your prefered settings.
Reaktionen: