java - how to run weblogic domain as windows service -


i have created domain on weblogic server version 10.3.6. after deployed war file on domain. windows server server 2003

when start startweblogic.cmd in mydomain\bin server work alright. when log off stops automatically. here tried create window service described on oracle docs "http://docs.oracle.com/cd/e11035_01/wls100/server_start/winservice.html".

but service stops saying has nothing .

here 2 files created

1.) run.cmd in d:\weblogic\user_projects\domains\test\bin

{

setlocal set domain_name=test  set userdomain_home=d:\weblogic\user_projects\domains\test  set wl_home=d:\weblogic\wlserver_10.3 set server_name=adminserver set java_home=d:\java\jdk1.7.0_79\jdk1.7.0_79  set wls_user=weblogic set wls_pw=weblogic123 pause set production_mode=true pause call d:\weblogic\wlserver_10.3\server\bin\installsvc_ank.cmd pause endlocal 

}

2.) installsvc.cmd in d:\weblogic\wlserver_10.3\server\bin

{

@echo off setlocal    set admin_url=http://localhost:7005  set mem_args=-xms256m -xmx512m pause     @rem check weblogic classes expect them :checkwls if exist "%wl_home%\server\lib\weblogic.jar" goto checkjava echo weblogic server wasn't found in directory %wl_home%\server. echo please edit script wl_home variable points  echo weblogic installation directory. goto finish  pause  @rem check java expect :checkjava if exist "%java_home%\bin\javaw.exe" goto runweblogic echo jdk wasn't found in directory %java_home%. echo please edit script java_home variable  echo points location of jdk. goto finish  pause :runweblogic  if not "%java_vm%" == "" goto noresetjavavm if "%java_vendor%" == "bea" set java_vm=-jrocket if "%java_vendor%" == "hp"  set java_vm=-server if "%java_vendor%" == "sun" set java_vm=-server  :noresetjavavm if not "%mem_args%" == "" goto noresetmemargs set mem_args=-xms32m -xmx200m  :noresetmemargs  @echo on  set classpath=%weblogic_classpath%;%classpath%  @echo *************************************************** @echo *  start weblogic server, use password     * @echo *  assigned system user.  system       * @echo *  username , password must used     * @echo *  access weblogic server console web  * @echo *  browser.                                       * @echo ***************************************************  rem *** set command line service execute within created jvm  @echo off  if "%admin_url%" == "" goto runadmin @echo on set cmdline="%java_vm% %mem_args% %java_options% -classpath \"%classpath%\" -dweblogic.name=%server_name% -dweblogic.management.username=%wls_user% -dweblogic.management.server=\"%admin_url%\" -dweblogic.productionmodeenabled=%production_mode% -djava.security.policy=\"%wl_home%\server\lib\weblogic.policy\" weblogic.server" goto finish  :runadmin @echo on set cmdline="%java_vm% %mem_args% %java_options% -classpath \"%classpath%\" -dweblogic.name=%server_name% -dweblogic.management.username=%wls_user% -dweblogic.productionmodeenabled=%production_mode% -djava.security.policy=\"%wl_home%\server\lib\weblogic.policy\" weblogic.server"  :finish rem *** set extrapath win32 , win64 platform separately if "%wl_use_x86dll%" == "true" set extrapath=%wl_home%\server\native\win\32;%wl_home%\server\bin;%java_home%\jre\bin;%java_home%\bin;%wl_home%\server\native\win\32\oci920_8  if "%wl_use_ia64dll%" == "true" set extrapath=%wl_home%\server\native\win\64\;%wl_home%\server\bin;%java_home%\jre\bin;%java_home%\bin;%wl_home%\server\native\win\64\oci920_8  if "%wl_use_amd64dll%" == "true" set extrapath=%wl_home%\server\native\win\x64\;%wl_home%\server\bin;%java_home%\jre\bin;%java_home%\bin;%wl_home%\server\native\win\x64\oci920_8  rem *** install service "%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%  endlocal 

}

try debug service using following command

beasvc -debug "<your_windows_service_name>" 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -