Как запустить домен WebLogic в качестве службы Windows
Я создал домен на сервере weblogic версии 10.3.6. После этого я развернул файл войны в этом домене. Мой сервер Windows - сервер 2003
Когда я запускаю startWebLogic.cmd в mydomain \ bin, мой сервер работает нормально. когда я выхожу из системы, она автоматически останавливается Здесь я попытался создать оконный сервис, как описано в документации Oracle: http://docs.oracle.com/cd/E11035_01/wls100/server_start/winservice.html.
Но мой сервис перестает говорить, что это не имеет никакого отношения.
вот 2 файла, которые я создал
1.) Запустите.cmd в 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.) установить SVCcmd в D: \ WebLogic \ wlserver_10.3 \ server \ bin
{
@echo off
SETLOCAL
set ADMIN_URL=http://localhost:7005
set MEM_ARGS=-Xms256m -Xmx512m
pause
@rem Check that the WebLogic classes are where we expect them to be
:checkWLS
if exist "%WL_HOME%\server\lib\weblogic.jar" goto checkJava
echo The WebLogic Server wasn't found in directory %WL_HOME%\server.
echo Please edit your script so that the WL_HOME variable points
echo to the WebLogic installation directory.
goto finish
pause
@rem Check that java is where we expect it to be
:checkJava
if exist "%JAVA_HOME%\bin\javaw.exe" goto runWebLogic
echo The JDK wasn't found in directory %JAVA_HOME%.
echo Please edit your script so that the JAVA_HOME variable
echo points to the location of your 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 * To start WebLogic Server, use the password *
@echo * assigned to the system user. The system *
@echo * username and password must also be used to *
@echo * access the WebLogic Server console from a web *
@echo * browser. *
@echo ***************************************************
rem *** Set Command Line for service to 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 up extrapath for win32 and 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 the 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
}
1 ответ
Попробуйте отладить сервис, используя следующую команду
beasvc -debug "<your_windows_service_name>"