@setlocal
@echo off
if "%1"=="" goto withoutSNAP
echo Snap mode is on (with native thread id)
set FJEJB_JVM_OP=-DFJSNAP=2
rem copy .\FJEJBconfig.properties_withTID %IS_HOME%\ejb\etc\FJEJBconfig.properties
goto start

:withoutSNAP
rem copy .\FJEJBconfig.properties_withoutTID %IS_HOME%\ejb\etc\FJEJBconfig.properties
goto start

:start
set JDBCDRIVER=F:\oracle\ora92\jdbc\lib\classes12.jar;F:\oracle\ora92\jdbc\lib\nls_charset12.jar
set SPEC_HOME=F:\SPEC
set CLASSPATH=%CLASSPATH%;%JDBCDRIVER%;%SPEC_HOME%\jars\xerces.jar

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms768m -DFJPassByValue=yes
set FJEJB_JVM_MX=768
echo Starting OrderSes (-Xmx768m) ...
ejbdstarteb OrderSes 2>NUL

REM echo Starting OrderSes2 (-Xmx768m) ...
REM ejbdstarteb OrderSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms768m -DFJPassByValue=yes
set FJEJB_JVM_MX=768
echo Starting CartSes ...
ejbdstarteb CartSes 2>NUL

echo Starting CartSes2 ...
ejbdstarteb CartSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms512m -DFJPassByValue=yes
set FJEJB_JVM_MX=512
echo Starting OrderCustomerSes ...
ejbdstarteb OrderCustomerSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms128m -DFJPassByValue=yes
set FJEJB_JVM_MX=128
echo Starting LargeOrderSes ...
ejbdstarteb LargeOrderSes 2>NUL

echo Starting AssemblyEnt ...
ejbdstarteb AssemblyEnt 2>NUL

echo Starting ItemEnt ...
ejbdstarteb ItemEnt 2>NUL

echo Starting CorpAuditSes ...
ejbdstarteb CorpAuditSes 2>NUL

echo Starting OrderAuditSes ...
ejbdstarteb OrderAuditSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms896m -DFJPassByValue=yes
set FJEJB_JVM_MX=896
echo Starting WorkOrderSes ...
ejbdstarteb WorkOrderSes 2>NUL

echo Starting WorkOrderSes2 ...
ejbdstarteb WorkOrderSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms256m -DFJPassByValue=yes
set FJEJB_JVM_MX=256
echo Starting ReceiverSes ...
ejbdstarteb ReceiverSes 2>NUL

set FJEJB_JVM_OP= -XX:+UseTLAB -XX:+ResizeTLAB -Xms128m -DFJPassByValue=yes
set FJEJB_JVM_MX=128
echo Starting MfgAuditSes ...
ejbdstarteb MfgAuditSes 2>NUL

echo Starting SupplierAuditSes ...
ejbdstarteb SupplierAuditSes 2>NUL

REM echo Starting WorkOrderSes3 ...
REM ejbdstarteb WorkOrderSes 2>NUL

endlocal
