REM --> Change the WASDIR property to point to your WAS installation folder
set WASDIR=E:\WebSphere\AppServer
set EJBMAKERDIR=D:\EJBMaker2

REM --> No more changes are necessary

set OLDCLASS=%CLASSPATH%
set CLASSPATH=%EJBMAKERDIR%\example\;%EJBMAKERDIR%\lib\ejbmaker.jar;%EJBMAKERDIR%\lib\jce1_2_1.jar;%EJBMAKERDIR%\lib\xerces.jar;%EJBMAKERDIR%\install\classes;%CLASSPATH%

java com.ibm.almaden.ejbmaker.EJBSourceGenerator -d \EJBMaker2\example -p com.ibm.almaden.ejb -db \EJBMaker2\example -v 4 example.xml
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\HomePool\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\Timezone\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\Role\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\Person\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\Event\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\Attendee\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\ejb\session\*.java
javac -g -d \EJBMaker2\install\classes com\ibm\almaden\client\*.java

java com.ibm.almaden.ejbmaker.DDMerger \EJBMaker2\example\com\ibm\almaden\ejb\ejb-jar.xml \EJBMaker2\example\com\ibm\almaden\ejb\session\ejb-jar.xml \EJBMaker2\example\com\ibm\almaden\ejb\merger-jar.xml
move \EJBMaker2\example\com\ibm\almaden\ejb\merger-jar.xml \EJBMaker2\example\com\ibm\almaden\ejb\ejb-jar.xml
mkdir ..\install\classes\META-INF
copy \EJBMaker2\example\com\ibm\almaden\ejb\ejb-jar.xml ..\install\classes\META-INF
pushd ..\install\classes
jar cvf example.jar *.*
EJBDeploy example.jar .temp DeployableExample.jar -cp "%WASDIR%\lib\xerces.jar;%EJBMAKERDIR%\lib\ejbmaker.jar"
copy DeployableExample.jar %WASDIR%\installableApps
set CLASSPATH=%OLDCLASS%
popd



