Building and Running the Application
There are four main steps:
- Configuring the workspace to run in your local environment
- Compiling the source code and deploying an EAR
- Creating the database schema and loading test data
- Starting the server
Configuration
Edit the file properties/local.properties:
- Change the various properties to specify the location of jboss, junit,
jdoGenie, the JDK, and oracle
- Change the db.* properties to match your database settings
Edit the file ant.cmd:
- Change ANT_HOME to point to where you have installed ant
Edit bootstrapsetenv.cmd so that it can find your JDK.
Creating the EAR
This step creates an EAR that is deployed in the directory deploy/jboss/server/devel/deploy
cd into the top-level directory (example-).
Run the command "ant create-setenv"
- This will create the file setenv.cmd and then exit
Run the command "ant deploy"
This is the directory where ant is run
Creating the Database
This step creates the database and loads the test data
Create a user in the database and make sure the db.* properties in
properties/local.properties are correct.
Run "ant create-db", which does the following:
- Uses SQLPlus to run a create-tables.sql script. It logs in using the
user/password specified by the db.* properties in local.properties
- Uses sqlldr to load some zip codes
- Runs a java program to populate the database with the rest of the test
data:
ignore this error - java.io.FileNotFoundException: objectid.properties
Starting the Server
This step runs JBoss in the directory deploy/jboss
To start jboss run the command "ant start"
Running the Test Cases
Build.xml defines the following targets for running tests:
- test-all - runs all tests
- test-db-service - tests the session facade
- test-jdo-impl - runs all the JDO tests