Deploying the entity in WebLogic Server
We have created all the classes and configuration files we need to create an EJB 3.0 entity bean. Next, we shall compile the classes to create a EJB JAR file. We shall create a WAR file from the EJB 3.0 client JSP and package the WAR file with the JAR file into an EAR file. We shall use a build.xml
script to compile the EJB classes, create an EAR file, and deploy the EAR file to WebLogic Server. Create a build.xml
script in the JPA project with File | New | Other and XML | XML in the New window. The build.xml script is shown next:
In the build script, specify properties for the various directory paths used in the script, such as the WebLogic server directory, the build
directory, and the WebLogic Server deploy
directory. Specify the classpath of the various JAR files required for compiling the EJB classes. Specify targets
discussed in the following table:
Target |
Description |
---|---|
prepare |
Creates the build directory. |
compile |
Compiles the EJB classes. ... |