Thursday, March 11, 2010

Windows Service

1)Installing Weblogic Server as a Windows Service:

Steps:

Create a batch file (.bat format) with the following script in the domain directory to Start WLS as a windows service and run this batch file through the command prompt.

Syntax:
---------------------------------------------------
SETLOCAL
set DOMAIN_NAME=
set USERDOMAIN_HOME=
set SERVER_NAME=
set JAVA_HOME=
call “
ENDLOCAL
---------------------------------------------------

For Example:
---------------------------------------------------
SETLOCAL
set DOMAIN_NAME= MyDomain
set USERDOMAIN_HOME= C:\bea101\user_projects\domains\MyDomain
set SERVER_NAME=AdminServer
set JAVA_HOME= C:\bea-WL-Server100\jdk150_11
call "C:\bea101\wlserver_10.0\server\bin\installSvc.cmd"
ENDLOCAL
---------------------------------------------------
After running this script in the command prompt you will observe a statement such as
“beasvc Server installed” When you observe in the windows services you will find the Admin server as installed and now start the service.

2)Procedure for Uninstalling Weblogic Admin Server as a Windows Service

Steps:

Create a batch file (.bat format) with the following script in the domain directory to Stop WLS as a windows service and run this batch file through the command prompt.
---------------------------------------------------
SETLOCAL
set WL_HOME=
rem *** Uninstall the service
"%WL_HOME%\server\bin\beasvc" -remove -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%"
ENDLOCAL
---------------------------------------------------

For Example:
---------------------------------------------------
SETLOCAL
set WL_HOME= C:\bea101\wlserver_10.0
rem *** Uninstall the service
"%WL_HOME%\server\bin\beasvc" -remove -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%"
ENDLOCAL
---------------------------------------------------
After running this script in the command prompt you will observe a statement such as
“beasvc _ removed”
When you observe in the windows services you will find that the Admin server is uninstalled.
------------------------------------------------------------------------------------------------------------


3)Steps to change the server mode from production to development when started as windows service:

Step1: Open regedit from “run” window

Step2: Go to HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Services -> -> Parameters -> CmdLine

Step3: Copy the value of CmdLine key to notepad

Step4: Modify -Dweblogic.ProductionModeEnabled to -Dweblogic.ProductionModeEnabled=false

Step5: Paste it back to CmdLine key

Step6: Save it & restart the server.

No comments:

Post a Comment