ObjectDB - Object Database for Java Home | About Us | Customers | Free Download | Purchase
 
  <Back to Main Menu>   
 
 
JDO Directory Demo
Demo Home

Source Code
directory.Utilities
directory.pc.*
directory.step1.*
directory.step2.*
directory.step3.*
directory.step4.*

J2SDK Instructions
J2SDK on Windows
J2SDK on Unix

IDE Instructions
Borland JBuilder
IBM Eclipse
NetBeans / Forte /
Sun One Studio
JCreator
 



 

ObjectDB for Java/JDO Demo
Instructions for JBuilder

     JDO Directory

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.

JDO JBuilder

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.

JDO JBuilder

Now, press the New... button to define a new library.

JDO JBuilder

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:

JDO JBuilder

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:

JDO JBuilder

Step 3
This step retrieves objects from the database using JDO extents and queries, without modifying the database.

The expected output is:

JDO JBuilder

Step 4
The final step opens the visual manager window.

JDO Directory Swing/JFC Application Screenshot





Copyright 2001-2007 ObjectDB Software. All rights reserved.