chapter-9 of the EJB book
introduced you to the
javax.persistence.Query interface as well as the intricacies of EJB
QL. The exercises in this chapter explore the Query API and provide examples of base EJB QL features.
This exercise is made up of several example programs to illustrate the Query API and the basic features of EJB QL. The example programs run outside of the application server, so there is no need to start up JBoss.
The standalone Java Persistence solution initializes the Hypersonic SQL database and generates the database schema each time one of the sample programs is run. This is an in-memory database, so you will not see any files created for the database.
Perform the following steps:
Open a command prompt or shell terminal and change to the ex09_1 directory created by the extraction process.
variables to point to where your JDK and JBoss 4.0 are
C:\workbook\ex09_1> set JAVA_HOME=C:\jdk1.5.0 C:\workbook\ex09_1> set JBOSS_HOME=C:\jboss-4.0.x
$ export JAVA_HOME=/usr/local/jdk1.5.0 $ export JBOSS_HOME=/usr/local/jboss-4.0
ant to your
execution path. Ant is the build utility.
C:\workbook\ex09_1> set PATH=..\ant\bin;%PATH%
$ export PATH=../ant/bin:$PATH
Perform the build by typing
Each example program starts off in the same way. It creates ...