Skip to content

Commit

Permalink
Merge pull request #144 from ExclamationLabs/support-4.2
Browse files Browse the repository at this point in the history
Thank you for the contribution.
  • Loading branch information
virgo47 committed Jun 16, 2021
2 parents 6b18a65 + 4a3d622 commit 2ada044
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
14 changes: 9 additions & 5 deletions dist/src/main/bin/service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ REM ----- Execute The Requested Command ---------------------------------------

set EXECUTABLE=%BIN_DIR%\midpoint.exe
set PR_INSTALL=%EXECUTABLE%
set MIDPOINT_START_CLASS=com.evolveum.midpoint.tools.layout.MidPointWarLauncher

REM use spring-boot through the PropertiesLauncher to start and the legacy WarLauncer to stop the application
set MIDPOINT_START_CLASS=org.springframework.boot.loader.PropertiesLauncher
set MIDPOINT_STOP_CLASS=com.evolveum.midpoint.tools.layout.MidPointWarLauncher

REM Service log configuration
set PR_LOGPREFIX=%SERVICE_NAME%
Expand Down Expand Up @@ -104,9 +107,9 @@ set PR_STARTCLASS=%MIDPOINT_START_CLASS%

REM Shutdown configuration
set PR_STOPMODE=jvm
set PR_STOPMETHOD=%PR_STARTMETHOD%
set PR_STOPMETHOD=main
set PR_STOPPARAMS=stop
set PR_STOPCLASS=%MIDPOINT_START_CLASS%
set PR_STOPCLASS=%MIDPOINT_STOP_CLASS%

REM JVM configuration
set PR_JVMMS=1024
Expand All @@ -132,6 +135,7 @@ echo Using JRE_HOME: "%JRE_HOME%"

REM Install service
"%PR_INSTALL%" //IS//%SERVICE_NAME% ^
--Description="Identity Governance and Administration Application" ^
--StartMode="%PR_STARTMODE%" ^
--StartClass="%PR_STARTCLASS%" ^
--StartMethod="%PR_STARTMETHOD%" ^
Expand All @@ -149,7 +153,7 @@ REM Install service
--LogLevel="%PR_LOGLEVEL%" ^
--StdOutput="%PR_STDOUTPUT%" ^
--StdError="%PR_STDERROR%" ^
--JvmOptions -Dmidpoint.home="%MIDPOINT_HOME%";-Dpython.cachedir="%MIDPOINT_HOME%\tmp";-Djavax.net.ssl.trustStore="%MIDPOINT_HOME%\keystore.jceks";-Djavax.net.ssl.trustStoreType=jceks ^
--JvmOptions -Dmidpoint.home="%MIDPOINT_HOME%";-Dpython.cachedir="%MIDPOINT_HOME%\tmp";-Djavax.net.ssl.trustStore="%MIDPOINT_HOME%\keystore.jceks";-Djavax.net.ssl.trustStoreType=jceks;-Dloader.path=WEB-INF/classes,WEB-INF/lib,WEB-INF/lib-provided,"%MIDPOINT_HOME%\lib" ^
--Classpath="%PR_CLASSPATH%"

if not errorlevel 1 goto installed
Expand All @@ -158,4 +162,4 @@ goto end
:installed

:end
cd %CURRENT_DIR%
cd %CURRENT_DIR%
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,7 @@ public static synchronized void start(String[] args) throws Exception {
}

public static synchronized void stop(String[] args) throws Exception {
try {
if (warLauncher != null) {
warLauncher.launch(args, warLauncher.getMainClass(), classLoader, true);
warLauncher = null;
classLoader = null;
}
} catch (Exception ex) {
throw new Exception(
"Could not stop MidPoint application" + ";" + ex.getLocalizedMessage(), ex);
}
System.exit(0);
}

@SuppressWarnings("SameParameterValue")
Expand Down

0 comments on commit 2ada044

Please sign in to comment.