ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
the options to run the Ant script shown as follows:
Output of running Ant build script with no arguments
It is best to set the J2EE_HOME environment variable
before running this build script.
To compile the example use Ant as follows:
ant compile
To compile and package the examples use the following:
ant package
To create sample tables for this example use the following:
ant createTables
The last step (SQL DDL) is more for EJB implementation that have robust entity to SQL
table mapping, which the reference implementation does not. I left this in there just in
case you want to port the examples to your application server of choice. It is just starter
SQL DDL code and only does the first table as the reference implementation creates
the tables for you.
Once you use the Ant build script to compile the source, package the classes into jars,
and package the jars into an
.ear
file, then you will want to open the
.ear
file with
deploytool which is described in the next section.
Deploying your application with
deploytool
Most application server s ship with deployment tools. These tools typically allow you to
deploy your application and to map entity beans and CMP fields to tables and columns
in a database. The reference implementation is no different. It ships with a deploy tool
called
deploytool
.
The rest of this panel assumes you will be using the reference implementation and Ant
to compile, package, and deploy your application. Make adjustments for your
application server where necessary. For notes on how to setup your environment see
the previous section.
In order to deploy the
.ear
file, you will need to run the J2EE reference implementation,
and the Cloudscape RDBMS system. Once the J2EE application server and
Cloudscape are running you will want to run the deploy tool described as follows:
Page 32 of 48
Introducing EJB CMP/CMR, Part 1 of 2






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved