You will use Ant project builds the EJB-JAR from the provided Java source files and the deployment descriptor. Source files are beneath the src directory in package subdirectory com/sybase/easerver/tutorials/ejb. The master copy of the deployment descriptor is manifest/META-INF/ejb-jar.xml.
Table 6-1 describes the source files for the Glossary entity bean, which interacts with the database to manage a glossary of terms and definitions:
File |
Purpose |
---|---|
Glossary.java |
The remote interface |
GlossaryHome.java |
The home interface |
GlossaryBean.java |
Implements the component methods |
Table 6-2 describes the source files for the Query stateless session bean, which implements methods to lookup definitions by calling the Glossary bean.
File |
Purpose |
---|---|
Query.java |
The remote interface |
QueryHome.java |
The home interface |
QueryBean.java |
Implements the component methods |
The Ant project, defined by build.xml, does the following:
Compiles the component source files to the jar-image directory, creating the directory if necessary.
Copies the deployment descriptor to the same location.
Archives the contents of the jar-image directory to create the EJB-JAR file, ejbtut.jar.
If you wish, you can review the Ant commands to perform these
tasks in the definition of the ejbjar
target
in build.xml. However, you don’t need
to know Ant to run the tutorial. Documentation for Ant can be found
on the Apache Web site.