jeudi 14 novembre 2013

Create a WLS Instance as a Windows Service and customise the Memory Values (Heap Size).


Because I could not find a unique and simple doc on how to create a Windows service for the JDE managed servers... And modify the start/max Heap size of the JVM, which by default is set to 200m!

In order to create WLS as a Windows service and make it able to work with E1, follow these steps:

Create a text file:


%MIDDLEWARE_HOME%\user_projects\domains\servers\<managed_server_name>\security\boot.properties

Add the following lines

username=weblogic
password=<your_password>

Create a custom script as below:

install_PGF_PPD_J2EE01_Service.cmd

SETLOCAL
set DOMAIN_NAME=PGF_Apps
set USERDOMAIN_HOME=D:\PGF\Oracle\Middleware\user_projects\domains\PGF_Apps
set SERVER_NAME=PGF_PPD_J2EE01
set PRODUCTION_MODE=true
set ADMIN_URL=http://wwt9pgfapp01:9051
set WLS_USER=weblogic
set WLS_PW=*********
CLASSPATH=D:\PGF\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\oracle\11g\ojdbc5.jar
call "D:\PGF\Oracle\Middleware\user_projects\domains\PGF_Apps\bin\setDomainEnv.cmd"
call "D:\PGF\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

This command file will call two WLS master scripts:

  - setDomainEnv.cmd
  - installSvc.cmd

These files come with the default installation of Weblogic Server and they are located in these locations:

 - %MIDDLEWARE_HOME%\wlserver_10.3\server\bin\installSvc.cmd
 - %MIDDLEWARE_HOME%\wlserver_10.3\user_projects\domains\<DomainName>\bin\setDomainEnv.cmd

In installSvc.cmd, apply the following changes:
  • Customise the name of he service that will appear in the Windows Services Application:
-install -svcname:"Oracle %DOMAIN_NAME%_%SERVER_NAME%"

  • Increase the max heap size to 1GB. Note that for E1 applications, Oracle Support recommends min and max JVM heap size of 2G and that is set @ 200m by default !!!:
set MEM_ARGS=-Xms32m –Xmx1024m.
These values are then stored in (and can be modified in): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\<Service_Name>\Parameters

Launch the script created above:

It will create the Windows Service as below. Is is recommended to start this service automatically with a Windows services user:



Aucun commentaire:

Enregistrer un commentaire