<service>
    <id>UHFConcentrator</id>
    <name>UHFConcentrator</name>
    <env name="JMX_PORT" value="12345"/>
    <env name="CUSTOM_ARGUMENTS" value="-Xmx512m"/>
   
    <env name="APP_HOME" value="%BASE%\.."/>
    <env name="JRE_HOME" value="%APP_HOME%\jre\bin\"/>
    <env name="LOGS_DIR" value="%APP_HOME%\logs"/>
    <env name="CLASSPATH" value="%APP_HOME%\lib\*"/>   
    <env name="JAVA_ARGUMENTS" value="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%LOGS_DIR% -Dlogging.config=file:%APP_HOME%\config\log4j2.properties -Dcom.sun.management.jmxremote.port=%JMX_PORT% -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"/>
    <env name="JAVA_CLASS" value="-jar %APP_HOME%\lib\UHFConcentrator.jar"/>
    <env name="APPLICATION_ARGUMENTS" value="--spring.config.location=%APP_HOME%\config\application.properties"/>
    <workingdirectory>%APP_HOME%</workingdirectory>
    <description>This service runs the UHFConcentrator</description>
    <executable>%JRE_HOME%javaw.exe</executable>
    <startarguments>%CUSTOM_ARGUMENTS% %JAVA_ARGUMENTS% %JAVA_CLASS% %APPLICATION_ARGUMENTS%</startarguments>
    <logpath>%LOGS_DIR%</logpath>
    <log mode="roll-by-size">
        <sizeThreshold>102400</sizeThreshold>
        <keepFiles>10</keepFiles>
    </log>
</service>