Steps:

1. Create a staging directory:

The script creates a directory named build in which EJB classes and deployment files are staged before they are packaged into a .jar file. XML deployment files are placed in the META-INF subdirectory of build:

      mkdir build build\META-INF
      copy *.xml build\META-INF

In the next step, compiled EJB classes are also placed in the build directory, in subdirectories that match the classes' Java package structure.

2.Compile the Java classes:

      javac -d build  <CLASS LIST...>

3.Package the EJB files into a .jar:

 Next, the build script uses the jar utility to create a .jar file of the subdirectories staged in build:

      cd build
      jar cv0f  XXX.jar META-INF examples
      cd ..

4.Compile the container classes using weblogic appc:

Once the .jar file has been created, the build script uses appc to generate EJB container classes. Weblogic appc inserts the container classes into a new .jar file, which is then copied in the $APPLIC_DIR directory:

      java  weblogic.appc -compiler javac build/XXX.jar 

5. Create the ear file: this is simply a jar file that contains your bean and application.xml deployment descriptor

mkdir build/ear/ build/ear/META-INF/
cp application.xml build/ear/META-INF/
mv build/$(BEAN_JAR) build/ear/$(BEAN_JAR)
cd build/ear && jar -cvf $(BEAN_EAR) $(BEAN_JAR) META-INF

6.Compile the client classes:
     

The script uses javac to compile the EJB example's client classes into the appropriate directories. In the beanManaged example, compiled clients are placed in the $CLIENT_DIR and $SERVLET_DIR directories:

     javac -d<dest_dir>  <CLIENT_CLASS_LIST>