@echo off
title "Messaging"
SETLOCAL
rem set JAVA_OPTIONS=-Xms256m -Xmx256m -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=5015,server=y,suspend=n -Djava.compiler=NONE
set JAVA_OPTIONS=-Xms256m -Xmx256m
set JAVA_VM=-server
set CLASSPATH=.;%WL_HOME%\server\lib\weblogic.jar;%EDB_PROJECT_HOME%\HECMS_Libraries\lib\jakarta-commons\commons-logging.jar;%EDB_PROJECT_HOME%\HECMS_Libraries\lib\jakarta-commons\commons-lang.jar;%EDB_PROJECT_HOME%\HECMS_Framework\dist\framework.jar;%EDB_PROJECT_HOME%\HECMS_Messaging\dist\local\test.jar

if [%1]==[] goto usage

if "%1" == "S" (
	title Messaging Sender
	%JAVA_HOME%\bin\java %JAVA_VM% %JAVA_OPTIONS% gov.va.med.esr.vitria.Sender messagingConfig
) else (
	title Messaging Receiver
	if "%1" == "R" (
		%JAVA_HOME%\bin\java %JAVA_VM% %JAVA_OPTIONS% gov.va.med.esr.vitria.Receiver messagingConfig
	) else (
		goto usage
	)
) 

goto end

:usage
echo Requires a single argument: [S] (for Sender) or [R] (for Receiver)

:end
ENDLOCAL
