See Also: OJBWithJDO, UsingOJBWithJCS
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:
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:
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