2011/01/16 - Apache ObJectRelationalBridge has been retired.

For more information, please explore the Attic.


OJB - Links and further readings


This page contains interesting Links and recommended readings that will help to learn more about OJB concepts, related projects, didactic material, research reports, integration in frameworks etc.


OJB is based on a variety of conceptual sources. In this section I'll give a summary about the most prominent influences.

  1. Craig Larmans Applying UML and Patterns
  2. The Siemens Guys "Pattern-Oriented Software Architecture"
  3. Scott Amblers classic papers on O/R mapping
  4. The "Crossing Chasms" paper from Brown et. al.
  5. The GOF Design Patterns

(sorted by relevance)

1. The most important input came from Applying UML and Patterns. It contains a chapter describing the design of a PersistenceBroker based approach persistence layer. His presentation contains a lot of other good ideas (e.g. usage of Proxies, caching etc.) I implemented a lot of his things 1:1. This book is a must have for all OJB developers !

2. Larman does not cover the dynamic metadata concept. He mentiones that such a thing would be possible, but does not go into details. As I had been a fan of MetaLevel architectures for quite a while I wanted to have such a thing in OJB too !!!
mop-gif I took the concepts from the book Pattern-Oriented Software Architecture. They have a chapter on the Reflection pattern (aka Open Implementation, Meta-Level Architecture).
They even provide an example how to apply this pattern to a persistence layer.
There is another Architectural pattern from this book that I am using: The Microkernel pattern.
My idea was to have a kernel (the PersistenceBroker) that does all the hard work (O/R mapping, JDBC access, etc.)
High Level object transaction frameworks like a ODMG or JDO implementations are clients to the PersistenceBroker kernel in this concept!

3. I read Scott Amblers papers before starting OJB. Sure! There are several things in OJB that are from his classic The design of a robust persistence layer and from his Mapping Objects To Relational Databases. Most prominent: The PersistenceBroker concept.
I incorporated the Query API from the OpenSource project COBRA that applies Amblers PersistentCriteria concept.
Reading Amblers paper on these topics is a must.

But IMO these are the only aspects of Amblers presentation that map directly to OJB. Here are the concepts that differ:

  • Amblers concept relies on a persistent base class.
  • caching is not covered by his design
  • his concept of OID does not fit for legacy databases with compound PKs.
  • The OJB proxy concept is quite different (Ambler has proxy functionality in his PersistentObject base class.)
  • OJB does not use Insert- and UpdateCriteria
  • OJB uses a different mapping approach (A full metadata layer)

4. For several detail questions (like mapping inheritance hierarchies) I consulted crossing chasms. This is also a very good source for all O/R implementors.

5. For all the "small things" I'm using the common GOF patterns like Factory, Observer, Singleton, Proxy, Adaptor, State, Command, etc.

Here is a thesis describing concepts very similar to OJB.
As I read this paper I saw a lot of thing inspired by OJB. It's giving a nice introduction into the PersistenceBroker pattern and related topics.

The PARC software design area pioneering in Metalevel computation, aspect oriented programming etc.

by Thomas Mahler