Beruflich Dokumente
Kultur Dokumente
rem ###########################################################################
rem #
rem Copyright (c) 1996-2003, webMethods Inc. All Rights Reserved. #
rem server.bat : launch webMethods Integration Server #
rem #
rem Change IS_DIR and JAVA_DIR to reflect their locations on your system #
rem #
rem This script is designed to work with Java VM's that conform to the #
rem command-line conventions of Sun Microsystems (TM) Java Development Kit #
rem or Java Runtime Environment. #
rem #
rem ###########################################################################
SETLOCAL
set JAVA_MIN_MEM=128M
set JAVA_MAX_MEM=256M
rem ############################################################################
rem
rem Items in PREPENDCLASSES will be added to the classpath right after the serve
r.jar
rem Items in the APPENDCLASSES will be added to the absolute end of the CLASSPAT
H
rem
rem ############################################################################
set PREPENDCLASSES=
set APPENDCLASSES=
rem ############################################################################
rem
rem Items in PREPEND_SYSTEM_CLASSPATH will be added to the classpath before prox
y.jar
rem Items in APPEND_SYSTEM_CLASSPATH will be added to the absolute end of the CL
ASSPATH
rem
rem ############################################################################
set PREPEND_SYSTEM_CLASSPATH=
set APPEND_SYSTEM_CLASSPATH=
:start
rem .... server must start in install directory
cd /d "%IS_DIR%"
if exist LOCKFILE (
echo Only one Integration Server instance may be run from a particular
echo installation at a time. Make sure that this server is shut down
echo before trying to start it. If no server is running, then
echo delete the file
echo %IS_DIR%\LOCKFILE.
echo and try to start the server again.
goto :EOF
)
echo. > LOCKFILE
rem back up ini.cnf or restore if missing
if exist bin\ini.cnf copy /y bin\ini.cnf bin\ini.cnf.bak > nul
if not exist bin\ini.cnf copy /y bin\ini.cnf.bak bin\ini.cnf > nul
set PATH=%SAVED_PATH%
set CLASSPATH=%JAVA_CP%;%IS_PROXY_JAR%
rem SSL support
set PATH=%PATH%;%IS_DIR%\..\common\bin
rem
rem look for native packages: update path as needed
rem native packages contain DLLs that must be added to the path
rem in order to be dynamically loaded by the VM.
rem
for /D %%D in (packages\*) do call :updatePackageInfo %%D
rem
rem look for jars and zips to be appended to the classpath
rem
if exist lib\system\*.zip (
for %%D in ("%IS_DIR%"\lib\system\*.zip) do call :appendClasspath "%%D"
)
if exist lib\system\*.jar (
for %%D in ("%IS_DIR%"\lib\system\*.jar) do call :appendClasspath "%%D"
)
set CLASSPATH=%PREPEND_SYSTEM_CLASSPATH%;%CLASSPATH%;%APPEND_SYSTEM_CLASSPATH%
set PATH=%PATH%;%IS_DIR%\support\win32;%IS_DIR%\jvm\bin\classic;%IS_DIR%\lib;
rem
rem Run as an NT service ? If so, save program arguments to Registry
rem
if "1%1"=="1-service" (
if exist LOCKFILE del LOCKFILE
"%IS_DIR%\bin\SaveSvcParams.exe" /svcname %2 /jvm "%JAVA_DIR%" /binpath
"%PATH%" /classpath %CLASSPATH% /jvmargs "%JAVA2_MEMSET%" /progargs "%IS_DIR%\bi
n\ini.cnf"#"-service %2"#%PREPENDCLASSES_SWITCH%#%PREPENDCLASSES%#%APPENDCLASSES
_SWITCH%#%APPENDCLASSES%#%ENV_CLASSPATH_SWITCH%#%ENV_CLASSPATH%#%3#%4#%5#%6#%7#%
8#%9
goto :EOF
)
rem run integration server
title webMethods Integration Server
%JAVA_RUN% -DWM_HOME="%WM_HOME%" -classpath %CLASSPATH% %IS_PROXY_MAIN% "%IS_DIR
%"\bin\ini.cnf %PREPENDCLASSES_SWITCH% %PREPENDCLASSES% %APPENDCLASSES_SWITCH% %
APPENDCLASSES% %ENV_CLASSPATH_SWITCH% %ENV_CLASSPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9
set EL=%ERRORLEVEL%
if exist LOCKFILE del LOCKFILE
if "%EL%"=="42" goto start
rem
rem .... restore original classpath and path
set CLASSPATH=%SAVED_CP%
set PATH=%SAVED_PATH%
ENDLOCAL
goto :EOF
:updatePackageInfo
if not exist %1\code\libs goto :EOF
call :prependToPath %1\code\libs
goto :EOF
:prependToPath
set PATH=%1;%PATH%
goto :EOF
:appendClasspath
set CLASSPATH=%CLASSPATH%;%1
goto :EOF