@rem +-STEP 0---------------------------------------------------------- @rem | Call setupCmdLine, which sets WAS_HOME and JAVA_HOME. @rem | This assumes you installed Java along with the App Server, so that @rem | all JDK binaries, etc, will be under App Server directories. @rem | Pre-pend system PATH so that the binaries for this JDK will be used. call ..\..\..\..\..\..\bin\setupCmdLine.bat set PATH=%JAVA_HOME%\bin;%PATH% @echo +-STEP 1---------------------------------------------------- @rem | These are the Account enterprise bean files to be compiled. Because @rem | of the "-d ." option, the resulting class files will be put @rem | into a directory, relative to the current directory, based on the @rem | package statements in the source. For example, a package of @rem | com.yourco results in a directory com/yourco under the current @rem | directory, and the compiled class files will be put into it. @rem | Note that each compile is done with its own classpath, explicitly @rem | indicating the needed jar files. Also note that each classpath @rem | begins with . (dot) or the current directory. Therefore, compiles @rem | later in the list can find classes in the com.yourco package (for @rem | example) that were compiled earlier in the list, by looking into the @rem | directory com/yourco under the current directory. javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . InsufficientFundsException.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . AccountResourceBundle.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . Account.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . AccountKey.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . AccountBean.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . AccountBeanFinderHelper.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . AccountHome.java @echo +-STEP 2---------------------------------------------------- @rem | Next, create a JAR file of the above classes for input to the JETACE tool. @rem | The JAR file is just an intermediate file and does not have to be kept. jar cfv AccountJetaceIn.jar com/ibm/ejs/doc/account/*.class @echo +-STEP 3---------------------------------------------------- @rem | This is line-mode use of the JETACE tool. The "-classpath" option @rem | locates needed jar files. The xml file parameter specified below is @rem | an output of previously running JETACE in GUI mode, specifying various @rem | deployment descriptors, so that we can have an xml file to use here as @rem | input. The xml file identifies the jar file created in the previous @rem | step, for use as input. The xml file also specifies the name of the @rem | output jar file, which is basically what is in the input jar file, plus @rem | a deployment descriptor (SER) file. The deployment descriptor is created @rem | by running JETACE, using information in the input xml file. The output @rem | jar file is the EJB JAR file that you will deploy in the WebSphere @rem | Administrative Console. @rem | Remove the previous working directory, if it exists, and then create @rem | a new empty working directory. rmdir /s /q temp mkdir temp @rem | Now, run JETACE in line-mode java -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ivbjfaceall.jar;%WAS_HOME%\lib\jetace.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\xml4j.jar;%WAS_HOME%\lib\vaprt.jar;.\temp -DJETACE_WORK_DIR=.\temp com.ibm.ejb.jetjar.JetAceMain -f Account.xml @echo +-STEP 4---------------------------------------------------- @rem | These are the Transfer enterprise bean files to be compiled. Because @rem | of the "-d ." option, the resulting class files will be put @rem | into a directory, relative to the current directory, based on the @rem | package statements in the source. For example, a package of @rem | com.yourco results in a directory com/yourco under the current @rem | directory, and the compiled class files will be put into it. @rem | Note that each compile is done with its own classpath, explicitly @rem | indicating the needed jar files. Also note that each classpath @rem | begins with . (dot) or the current directory. Therefore, compiles @rem | later in the list can find classes in the com.yourco package (for @rem | example) that were compiled earlier in the list, by looking into the @rem | directory com/yourco under the current directory. javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . Transfer.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar -d . TransferHome.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;.\Account.jar -d . TransferBean.java @echo +-STEP 5---------------------------------------------------- @rem | Next, create a JAR file of the above classes for input to the JETACE tool. @rem | The JAR file is just an intermediate file and does not have to be kept. jar cfv TransferJetaceIn.jar com/ibm/ejs/doc/transfer/*.class com/ibm/ejs/doc/account/InsufficientFundsException.class @echo +-STEP 6---------------------------------------------------- @rem | This is line-mode use of the JETACE tool. The "-classpath" option @rem | locates needed jar files. The xml file parameter specified below is @rem | an output of previously running JETACE in GUI mode, specifying various @rem | deployment descriptors, so that we can have an xml file to use here as @rem | input. The xml file identifies the jar file created in the previous @rem | step, for use as input. The xml file also specifies the name of the @rem | output jar file, which is basically what is in the input jar file, plus @rem | a deployment descriptor (SER) file. The deployment descriptor is created @rem | by running JETACE, using information in the input xml file. The output @rem | jar file is the EJB JAR file that you will deploy in the WebSphere @rem | Administrative Console. @rem | Remove the previous working directory, if it exists, and then create @rem | a new empty working directory. rmdir /s /q temp mkdir temp java -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ivbjfaceall.jar;%WAS_HOME%\lib\jetace.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\xml4j.jar;%WAS_HOME%\lib\vaprt.jar;.\temp -DJETACE_WORK_DIR=.\temp com.ibm.ejb.jetjar.JetAceMain -f Transfer.xml @echo +-STEP 7---------------------------------------------------- @rem | The next compile is for internationalization (i18n) of the @rem | servlets compiled in Step 8. javac -classpath .;%JAVA_HOME%\rt.jar -d . ClientResourceBundle.java @echo +-STEP 8---------------------------------------------------- @rem | Finally, compile the various client files that will use the enterprise beans. @rem | Because of the "-d ." option, the resulting class files will be put into @rem | a directory, relative to the current directory, based on the package @rem | package statements in the source. javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\servlet.jar;.\Account.jar -d . CreateAccount.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\servlet.jar;.\Transfer.jar -d . TransferFunds.java javac -classpath .;%JAVA_HOME%\rt.jar -d . JSPBean.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\servlet.jar;%WAS_HOME%\lib\ibmwebas.jar;%WAS_HOME%\lib\webtlsrn.jar;.\Account.jar -d . CreateAccountJSP.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;%WAS_HOME%\lib\servlet.jar;%WAS_HOME%\lib\ibmwebas.jar;%WAS_HOME%\lib\webtlsrn.jar;.\Transfer.jar -d . TransferFundsJSP.java javac -classpath .;%JAVA_HOME%\rt.jar;%WAS_HOME%\lib\ejs.jar;%WAS_HOME%\lib\ujc.jar;.\Transfer.jar -d . TransferApplication.java