The example programs in Exercise 8.2 delve deeper into the
complexities of EJB QL. You will learn about arithmetic and
logic operators in
WHERE clauses as well as other, more complex
WHERE-clause constructs. The test programs of this
section demonstrate most of the example queries provided in Chapter 8
of the EJB book.
If you already have JBoss running, there is no reason to restart it.
Build the examples for this exercise in the
ex08_2 directory, following the same procedure
as for earlier exercises.
This exercise introduces no new features in JBoss-specific files. If you think you need to, review Exercise 6.1 of this workbook to understand the JBoss-specific files in this example.
The database tables for this exercise will automatically be created
in JBoss’s default database, HypersonicSQL, when the
EJB JAR is deployed, but to initialize all database tables in this
example, you must perform the Ant task
C:\workbook\ex08_2>ant run.initialize Buildfile: build.xml prepare: compile: run.initialize: [java] added Bill Burke [java] added Sacha Labourey [java] added Marc Fleury [java] added Jane Swift [java] added Nomar Garciaparra [java] added Richard Monson-Haefel
As in the preceding exercise, all example business logic is
implemented within a stateless session bean—in this case,
com.titan.test.Test82Bean—and the database initialization ...