ObjectDB for Java/JDO Demo
NetBeans / Sun One Studio
|
|
|
The JDO Directory demo has been tested with NetBeans 3.5.
NetBeans can be downloaded from:
http://www.netbeans.org/downloads/ide/, as a separate download,
or from:
http://java.sun.com/j2se/1.4.2/download.html, bundled with the Java 2 SDK.
Make sure that in Help => About => Details Java version 1.4 or above is
specified.
In addition, on the fly JDO enhancement requires external execution
to be specified in Tools => Options => Editing => Java Sources => Default Executor (the default).
Update the FileSystems
To build and run the demo you have to update the FileSystems.
This can be done in the current project (or in a new project using Project => Project Manager).
Right click the FileSystems root node.
Then use Mount => Local Directory to add the demo directory.
Use Mount => Archive Files to add jdo.jar and ObjectDB
jar file (odbfe.jar / odbse.jar / odbee.jar).
Mounting these JAR files is necessary for every project that uses ObjectDB and JDO.
Eventually, three direct child nodes should be added to the FileSystems root:
Build & Run
You can build the demo by the Build All command on the directory node
(using right click):
Use the Execute command (again, right click) to run the eMain
class of each step:
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.
|