@setlocal
@echo off
if "%1"=="light" goto light_mode

echo Stopping CartSes ...
ejbdstopeb CartSes 2>NUL

echo Stopping OrderSes ...
ejbdstopeb OrderSes 2>NUL

echo Stopping LargeOrderSes ...
ejbdstopeb LargeOrderSes 2>NUL

echo Stopping ReceiverSes ...
ejbdstopeb ReceiverSes 2>NUL

echo Stopping AssemblyEnt ...
ejbdstopeb AssemblyEnt 2>NUL

echo Stopping ItemEnt ...
ejbdstopeb ItemEnt 2>NUL

echo Stopping CorpAuditSes ...
ejbdstopeb CorpAuditSes 2>NUL

echo Stopping MfgAuditSes ...
ejbdstopeb MfgAuditSes 2>NUL

echo Stopping OrderAuditSes ...
ejbdstopeb OrderAuditSes 2>NUL

echo Stopping SupplierAuditSes ...
ejbdstopeb SupplierAuditSes 2>NUL

echo Stopping OrderCustomerSes ...
ejbdstopeb OrderCustomerSes 2>NUL

echo Stopping WorkOrderSes ...
ejbdstopeb WorkOrderSes 2>NUL

goto end

:light_mode
echo Stopping CartSes ...
odcntlque -s -kill IDL:CartSes/com/sun/ecperf/orders/cartses/ejb/CartSesHome:1.0
echo Stopping OrderSes ...
odcntlque -s -kill IDL:OrderSes/com/sun/ecperf/orders/orderses/ejb/OrderSesHome:1.0
echo Stopping LargeOrderSes ...
odcntlque -s -kill IDL:LargeOrderSes/com/sun/ecperf/mfg/largeorderses/ejb/LargeOrderSesHome:1.0
echo Stopping ReceiverSes ...
odcntlque -s -kill IDL:ReceiverSes/com/sun/ecperf/supplier/receiverses/ejb/ReceiverSesHome:1.0
echo Stopping AssemblyEnt ...
odcntlque -s -kill IDL:AssemblyEnt/com/sun/ecperf/mfg/assemblyent/ejb/AssemblyEntHome:1.0
echo Stopping ItemEnt ...
odcntlque -s -kill IDL:ItemEnt/com/sun/ecperf/orders/itement/ejb/ItemEntHome:1.0
echo Stopping CorpAuditSes ...
odcntlque -s -kill IDL:CorpAuditSes/com/sun/ecperf/corp/corpauditses/ejb/CorpAuditSesHome:1.0
echo Stopping MfgAuditSes ...
odcntlque -s -kill IDL:MfgAuditSes/com/sun/ecperf/mfg/mfgauditses/ejb/MfgAuditSesHome:1.0
echo Stopping OrderAuditSes ...
odcntlque -s -kill IDL:OrderAuditSes/com/sun/ecperf/orders/orderauditses/ejb/OrderAuditSesHome:1.0
echo Stopping SupplierAuditSes ...
odcntlque -s -kill IDL:SupplierAuditSes/com/sun/ecperf/supplier/supplierauditses/ejb/SupplierAuditSesHome:1.0
echo Stopping OrderCustomerSes ...
odcntlque -s -kill IDL:OrderCustomerSes/com/sun/ecperf/orders/ordercustomerses/ejb/OrderCustomerSesHome:1.0
echo Stopping WorkOrderSes ...
odcntlque -s -kill IDL:WorkOrderSes/com/sun/ecperf/mfg/workorderses/ejb/WorkOrderSesHome:1.0
goto end

:end
endlocal
