RealTime IT News

Apache Releases Object Relational Bridge

A new version of the ObjectRelationalBridge (OJB) project that operates under the auspices of the Apache Software Foundation (ASF) was officially released today.

The OJB is a subproject of the Apache DB project, whose mandate is to create and maintain commercial-quality, open source-licensed database solutions based on ASF-licensed software. According to the ASF's OJB Web site, "[OJB] is an object/relational mapping tool that allows transparent persistence for Java objects against relational databases."

The 1.0.3 release includes a long list of bug fixes, as well as a few new additions.

"We've included a backport of the new two-level cache from the 1.1 branch, which is a whole lot better designed than the previous two-level cache," OJB committer Brian McCallister told internetnews.com. "Mostly it is just a bug fix release, though."

According to McCallister, OJB is similar to TopLink, Kodo JDO, or Hibernate, though there are some differences.

"A key difference between OJB and the aforementioned libraries is that OJB exposes its persistence services at several different levels," McCallister explained. "At least in the case of JDO and Hibernate, there is really only the 'managed object graphs' type of API, which works great; OJB does this as well, but without as much access to the lower-level layers. You can drop down to SQL, or deal with SQL in any of them, but you cannot necessarily talk to the mapping layer directly and bypass the object management -- conveniently anyway."

Another difference between OJB and its competitors has to do with the fact that Apache is known for implementing standards, not creating them.

"OJB exposes a native API, an ODMG 3.0-compliant API, and a (not very useful right now, but we're working with Sun and others on this now) JDO 1.0 API," McCallister said.

The OJB project is also working on implementing a JDO 2.0 API once that is finalized, though McAllister noted that in that case it is working in conjunction with the Apache JDO project to make an OJB object/relational mapping backend for that system

"Several of us are working with the now open sourced JDO 2.0 code, which Sun has brought to Apache," McAllister said. "We hope to have OJB working as a solid backend to that codebase when JDO 2.0 is finalized."

The OJB team is also working on making the tool even more extensible and flexible.

"The biggest thing already completed but not yet released is a reworking of the configuration and component system to be more conveniently extensible and even more flexible, particularly for usage in IoC containers (Spring, Pico, EJB3, etc.)," McAllister said.