ObjectDB for Java/JDO Demo Instructions for JBuilder
|
|
|
The JDO Directory demo has been tested with JBuilder 8.0 Personal Edition.
JBuilder can be downloaded from:
http://borland.com/products/downloads/download_jbuilder.html.
If you are using an older JBuilder version, make sure that in the Paths
tab in the Project => Properties... dialog, j2sdk 1.4 or above is specified.
Open the Project
Open the jdo-directory.jpx project file, by either double clicking on the project file or by File => Open Project... from the IDE menu.
Note: It is easier to use ObjectDB and JDO in JBuilder when the output path (containing class files) and the source path (containing java files) refer to the same directory, as specified in the project properties of the demo project. On any other setting - remember that package.jdo should be available at runtime, so it should be located with the classes (make sure that JBuilder does not delete the package.jdo file on every rebuild).
Set the ObjectDB Library
Open the Project Properties dialog
(Project => Project Properties... in the menu).
In that dialog select the Required Libraries tab and press the
Add... button.
Now, press the New... button to define a new library.
Specify the library name as ObjectDB, and use the Add... button to add
jdo.jar and ObjectDB jar file (odbfe.jar / odbse.jar / odbee.jar)
located in the ObjectDB lib directory.
After closing the dialog boxes with the OK button, the library is ready.
Creating the library is a one time operation, but selecting it is required in
every project which uses ObjectDB and JDO.
Build & Run
After setting the ObjectDB library, compile all the demo source files using
Project => Make or Rebuild.
The Run => Run Project command will run step 4 (the visual manager).
To run the other steps, right click the eMain.java nodes in the project tree,
and select the Run command.
Step 1
This step creates a new ObjectDB database and stores an initial object graph
using JDO.
The expected output is:
The [ObjectDB Enhancer] message, indicating "on the fly" JDO enhancement of four
persistence capable classes, is not shown if these classes are already
enhanced.
Step 2
This step uses JDO to create, update and delete an object.
Eventualy, the database content remains the same after these operations.
The expected output is:
Step 3
This step retrieves objects from the database using JDO extents and queries,
without modifying the database.
The expected output is:
Step 4
The final step opens the visual manager window.
|