OJB Block: An O/R mapping tool.
Apache ObJectRelationalBridge (OJB) is an Object/Relational mapping tool that allows transparent persistence for Java objects against relational databases.
OJB has 3 methods for access to databases:
- 2. ODMG
- 3. JDO.
Note: Since JDO is the recommended successor of ODMG, we started to create samples using JDO. Later we will build support for the other methods and create some examples of them.
The OJB Block can be found in the Cocoon 2.1.3 and later.
The OJB samples are part of the "Block Samples", you can go directly to http://localhost:8888/samples/ojb/.
To run the samples also requires the HSQLDB block that run the test database. The samples with Woody needs the Woody block.
In order to run the JDO samples, you need:
1. Download the JDO libraries:
jdo.jar - for the OjbStore JDORI Plugin only.
jdori.jar - for the OjbStore JDORI Plugin only.
Note: Since 2.1.4-dev and later you need JDO 1.01. In older version please use JDO 1.0
2. Copy jdo.jar and jdori.jar to lib/local in your Cocoon 2.1 directory
3. Rebuild Cocoon.
That is all!
Note: If you don't want to recompile Cocoon, just copy the jdo.jar and jdori.jar jars to the WEB-INF/lib of your running Cocoon.
Note2: The note above doesn't seem to work because the relevent classes in the Cocoon Forms JDO examples do not appear to have the necessary JDO hooks in them if Cocoon wasn't recompiled with the jdo jars in the lib/local directory
info about the samples internals