ObJectRelationalBridge
BRIDGING JAVA OBJECTS AND RELATIONAL DATABASES


history

The ObJectRelationalBridge Project started as a tutorial to teach Java developers how to use Java Reflection, Collection classes, weak references and XML api to build a simple but robust persistence framework.

People are never satiesfied with what they have. So when folks saw what I built with them they did not say "Oh, thank you for this ingenious piece of software! It solves all our needs!". Instead they said: "Oops, You don't have Transaction support -- how bad.", "By the way, does your framework comply to ODMG?", "We need a multiuser, multithreaded, scalable ObjectServer, can you do this for us???"

So I began thinking of extending my simple framework to fulfill all these requirements and published my results as a open source project on sourceforge. Below you find a short history of changes in subsequent releases.

Release

Changes

0.1.1

initial public release

0.1.9

first prototype of ODMG compliant interface

0.1.17

New features:

  • working with Identities

  • proxy support in the PersistenceBroker  supports a set of Proxy-techniques, including

    • Lazy Collections, 

    • Configuration of lazy/eager materialization from XML repository,

  • Smart Updates/Inserts

0.1.30

New features:

  • Pessimistic Object Locking

  • Object rollback

  • extending Objectserver infrastructure

  • Configurable JDBC connection pooling

  • PersistenceBroker can produce PrimaryKey Enumerations, useful for EJB finder methods.

  • ANT build scripts

  • Junit regression tests (integrated into build scripts, try build[.sh|.bat] junit)

0.1.41

New features:

  • Using prepared statements,

Refactorings:

  • introducing a inheritance scheme to reduce code duplication between FieldDescriptor, ObjectReferenceDescriptor, CollectionDescriptor

  • Examples in ojb.examples.broker, ojb.examples.proxies moved to test.ojb.broker and rewritten as JUnit tests.

0.1.48

New features:

  • Named Roots, a simple ODMG compliant named roots implementation

Refactorings:

  • finished moving all sample classes from package ojb.examples to test.ojb. All samples are now rewritten as JUnit TestCases and can be run directly from the build script (see QuickStart info)

0.1.63

New features:

  • Query facility in the PersistenceBroker, allows queries by example and queries by filter criteria. In this release joins are not supported. I'm planning to use this query facility as a backend to the OQL implementation.

  • New TestClass test.ojb.broker.PerformanceTest allows profiling to detect performance critical operations. try "build performance".

changes, refactorings:

  • reimplemented the Named Roots Map as a persistent Collection. It is now complety integrated in the transaction mechanism.

  • changed the PersistenceBroker interface to reflect the usage of Query objects. changed all examples accordingly.

  • All PersistenceBroker Object are now declared as "throws PersistenceBrokerException"

  • faster implementation of ojb.broker.metadata.ClassDescriptor::getFieldDescriptorByIndex(int)

bug fixes:

  • prepared statement generation for String attributes in SQLGenerator

Open bugs:

  • The testmethod testWrongDbName in test.ojb.odmg.OdmgExamples still reports a failure.

0.1.70

New features:

  • Support for polymorphism. It is now possible to define extents consisting of several subclasses. The mechanism supports Interfaces as well as base-classes. There are still things that don't support polymorphism: PersistenceBroker.getIteratorByQuery and PersistenceBroker.getPkEnumerationByQuery. (They are Wrappers to JBDC ResultSets and I have no idea how to make ResultSets polymorph ;-)
    There is a new TestClass test.ojb.broker.PolymorphicExtents testing and demonstrating all relevant techniques.

  • New build target browse_db starts the InstantDB tool DBBrowser on the OJB demo database

  • first step towards persistent Collection implementation. I started with a DListImpl. Right now it does not implement more than add(), but persistence support works...

  • A SequenceManager responsible for generating unique values for primary-key columns. This class is aware of extents and maintains uniqueness of pk-values accross any number of tables.

changes, refactorings:

bug fixes:

Open bugs:

    • The testmethod testWrongDbName in test.ojb.odmg.OdmgExamples still reports a failure.

0.1.83

New features:

  • Support for user defined collections. It is now possible to use user defined collections (e.g. typed collections) as Collection attributes. These collections must implement the interface ojb.broker.ManageableCollection to provide minimum interoperability with the PersistenceBroker mechanisms.
    There is a new TestClass test.ojb.broker.TypedCollectionTest testing and demonstrating all relevant techniques.

  • There is a first fully functional ODMG Collection: Dlist. It's implemented by ojb.server.collections.DListImpl. There is a TestClass test.ojb.odmg.DListTest testing and demonstrating the usage of this collection.

changes, refactorings:

  • Complete redesign of the ODMG Transaction-mechanism. I unified the concepts of David's TransactionWrapper objects with my idea of ObjectModification objects, that had been responsible for different aspects of the transaction management in OJB.

  • Removed interface IPobject and baseclass Pobject. These were meant as examples for encapsulating PersistenceBroker code in business objects. I don't want to encourage such a poor design any longer...

  • Collection attributs can now be defined without reverse ReferenceAttributes. This design was based on the wrong assumption, that there is always a unique ReferenceAttribute describing the foreignkey relation betweeen the involved tables.
    Now Collection Attributes can be defined without specifying an inverse reverse ReferenceAttribute. To make this possible it's now necessary to specify the list of foreign key attributes (respectively their Descriptor Ids) within the CollectionDescriptor.

  • Harmonized the syntax for ReferenceDescriptors and CollectionsDescriptors in the repository.dtd. Now <auto.retrieve>, <auto.update>, <auto.delete> can be used in both classes. Usage of these tags is now optional. If <auto.retrieve> is ommited, true is the default value. If <auto.update>, <auto.delete> default value is false.

bug fixes:

  • storing of collection attributes did not work due to an error during the last refactoring. No JUnit test detected the error :-(
    Thanks to Sascha for reporting this bug.

Open bugs:

  • The testmethod testWrongDbName in test.ojb.odmg.OdmgExamples still reports a failure. Works correctly in my IDE !?

0.1.98

New features:

  • Now all Collections required by ODMG are implemented: DSet, DBag, DList DArray

  • The DMap ODMG persistent map is now also implemeted.

  • added support for using arrays to model 1-n relations.

  • new method RsIterator::releaseDbResources() can be used to free the JDBC resources used by the Iterator

  • added OJBSearchFilter from OpenEMed project (credits to Sascha)

  • Use JAXP Parser factory to create SAX Parser (credits to Dave)

  • Transaction support in PersistenceBroker

changes, refactorings:

  • proper handling of ClassNotPersistenceCapableExceptions

  • PersistenceBrokerImpl::getObjectByQuery() now also works with QueryByCriteria

  • move package examples to package test

  • removed quoting of column names

Open bugs:

  • The testmethod testWrongDbName in test.ojb.odmg.OdmgExamples still reports a failure. Works correctly in my IDE !?


0.1.100

New features:

  • Wrote a tutorial covering basic techniques to use OJB as a persistence layer.

0.1.110

New features:

- User defined Type- and Value mappings are now configurable per class.


changes, refactorings:

- refactored the PersistenceBroker to use Arrays instead of Vectors for all

timecritical internal operations

- ojb.broker.query.Criteria.toString() now generates better readable statements


bug fixes:

- corrections to OJBSearchFilter (thanks to Sascha)

- fixed an annoying bug in the XmlRepositoryHandler that somtimes damaged

tokens (thanks to Andrew)

- PersistenceBrokerImpl.store(...) does now handle null-values properly

(thanks to Andrew)

- RsIterator.hasNext() now also checks ResultSet.isAfterLast()

(thanks to Andrew)


Open bugs:

- Testmethods in test.ojb.odmg.OdmgExamples still report failures.

in my development environment (VisualAge) I can't reproduce them...

0.1.114

New features:

  • Wrote a tutorial about the usage of the OJB ODMG API. Includes a working tutorial application.

0.1.120

New features:

  • OQL Parser and OQLQuery are implemented

changes, refactorings:

- corrections and modifications to the ODMG tutorial to reflect
the newly implemented OQL interface

- modified the semantics of the register process for ODMG transactions:
now a register also recursively registers all associated objects
(registering a root node will register all child nodes)
- modified the semantics of ODMG transaction commit:
before an object is commited it is compared with its internal clone
to detect modifications.
- These to changes allow to get rid of the markModified operation, which
was neccessary to tell the transaction about object changes.
The Interface PersistenceCapable has been removed to reflect this change.

0.5.136

New features:

- OQL parameter binding operation implemented

- OQL filter operations in ODMG Collection implemented

- wrote a tutorial and a code example covering Conversion Strategies

- DListImpl, DBagImpl, DSetImpl, DMapImpl and the respective Iterators now

provide remove() methods


changes, refactorings:

- removed the prefix __ from the OJB internal tables,

to allow easier ports to Oracle, DB2 and other DBMS

- to minimize the size of serialized Identities they are now GZIPed

- rewrote the RsIterator methods next() and hasNext() to work even

with buggy JDBC 2.0 drivers...

- Creation and preparation of prepared Statements now compliant with JDBC 2.0

drivers for DB2 and Oracle.


bug fixes:

- changed the deletion sequence for dependend objects to prevent

referential integrity violations

0.5.151

New features:

- designed a PersistenceBroker server arcitecture that allows

to run multiple clients against one or more loadbalanced server processes.

This new architecture allows to build highly scalable distributed

applications with OJB.

(distributed Lockhandling is not finished yet.)

The client API remains unchanged, thus the PersistenceBroker

location is completely transparent to the clients.


changes, refactorings:

- I had to rename the whole project to ObJectRelationalBridge as

the old name is trademark protected.

- now running with instantDB 4.0

- major performance enhancements to RsIterator

- StatementsForClass now allows to work with JDBC1.0 and 2.0 Drivers


bug fixes:

- Sasha contributed a bug fix to the query SearchFilter facility.

- getObjectByQuery now supports polymorphism.

- minor bug fies in DList & co.

- release of DB resources in RsIterator fixed.

- PersistenceBroker.store() now places Objects in cache to maintain symmetry with the getXXX() Methods.

0.5.155

Only minor bug fixes

0.5.180

New features

- new Concept of RowReaders to let user interact with object matreialization from ResultSet Rows

- Mapping inheritance on one table support

- Make LockManager pluggable

- Sample JDBCDescriptor for mySQL

- Distributed Locking

- Integrate DDL-Generator

- PostgresSql support

- MySQL supprt

- Make Cache pluggable

- Make SequenceManager pluggable

- Make ConnectionFactory pluggable

- Write FAQ

- Order by ASC or DESC

- Provide a JDNI based ConnectionFactory

- Allow sequence numbering via declaration in xml file

- started Size- and Timelimited cache implementations

- Docs for OJB.properties

- Docs for RowReader

- Docs on cache an Sequence Manager

- Started Tutorial 3


refactorings

- Move all startup config to OJB.properties


bug fixes

- Proper implementation of AccessControl for Reflective access to private attributes

- Bug in PBImpl: enumeration of Connections is always empty

- Inconsistency of FieldDescriptor ids between INSERT and UPDATE statements

- Bug: same Statement is used across several brokers !

- Implement Java / SQL mapping according to JDBC spec.

- Bug in ServerPool.roundrobin()

- Connection timeouts make connections invalid: bug

0.5.200

New features

- Write Tutorial 3

- Make access to OJB.properties configurable ( System property pref.)

- Make implicit locking of associated objects configurable

- Use the JDK 1.3 Dynamic Proxies for PB Lazy loading

- Documentation for LockManager


refactorings

- ODMG: no registering in Constructors of ODMG Collections

- Unify Manual and Dynamic Proxy Mechanism,

- provide compatibility patch for JDK 1.2

- Remove superfluous methods from PB interface

- Remove all code references to SequenceManager

- Write a complete Testsuite for Locking mechanism

- Integrate with new version 3.7 of JUnit framework


bug fixes

- A bind / lookup sequence does not work within one transaction

- ODMG: bind must register new objects to current transaction

- ObjectStateTable.commit() must call PB.abort() in case of an exception

- JDBCAcccess must use getBytes() to read BINARY, VARBINARY and LONGVARBINARY

- Make Identities extent aware

0.7.235

new features:

-Implemented a Manageable HashSet

-Support for n:m associations

-Implemented a non persistent lockmanager for the singlevm mode

-Provided a replacement for JDK1.3 dynamic Proxies for JDK1.2. Works with VA Java!

- Integrated Rainers cache implementations

- Extended PB API with: GetDescriptorFor(Class), SetDescriptorFor(Class, ClassDescriptor)

- Implemented report queries that take SQL statements as input and return collections of Object[].

- Integrated Rainers implementation of a HIGH/LOW SequenceManager

- Implemented a mechanism to allow arbitrary select statements, that returns primary key values (or all primitive attributes) for a certain class. The Result of the statement can then wrapped by an Iterator that returns the identified objects.

- Replaced instantDB (now a comercial product) with HSQLDB.

- Made type of returned Collection in OQL queries configurable. Integrated Charles contribution of a ManageableArrayList

- Introduced new Usecase "Edit Product" to tutorial 1 and 2.

- Provide class diagrams for client/server document


bug fixes:

- Workaround for bug 4171142 of Sun's Java bug parade (problem with serialisation of metadata)

- fixed Minor bugs in DmapImpl

- fixed a SequenceManager bug that resulted in multiple assignment of ids.

- fixed bug in RsIterator.getObjectFromRs(...) if result == null

- fiexed bug: Rowreader not used with JDBCAccess.materializeObject(...)

- fixed bug: OJB Lockentry primary too big for db2

- Changed declaration of column TIMESTAMP_ in table OJB_LOCKENTRY to BIGINT (LONG)

- fixed bug in IndirectionHandler with primitive types


refactorings:

- Removed superfluous class CriteriaEception

- Removed Named Roots stuff from tutorial 2.

0.7.250

new features:

- Compatibility Patch for Interbase DB

- Automatic assignment of foreignkey attributes

- Improved Query interface: NOT, IN, BETWEEN, iSNULL ...

- Path Epressions: let SqlGenerator build joins

- Cache synchronisation for PersistenceBrokerServer clusters


bug fixes:

- Private Constructor for class ojb.odmg.OJB

0.7.277

new features:

- Provide full column name information in ClassDescriptor

- Sortable 1:n associations

- Integrate LOG4J (must use the preprocessor to avoid logging in production code)

- Integrate getUnique implementation from Jim

- Improve OQLQuery transaction handling if transaction was not opened

- SELECT DISTINCT support from Jakob


bug fixes:

- ODMG commit must throw TransactionAbortedException if an abort occurs.

- Delete null references: bug

- Transactionimpl.register(...) does not work properly for Proxies

- Correct ODMG checkpoint semantics

- Don't hide exceptions during queries, updates and inserts but reach them to client app !

- M:N bug: use full qualified column names

- Correct documentation regarding fk_descriptor_ids


refactorings:

- Cache synchronization

- JUNIT tests for Path expresseions

- Remove System.out.println() from JUNIT tests

- Improvements of RsIterator

- Introduce a GUID class

0.7.290

new features:

- SequenceManager: return long and Object

- Provide a better proxy mechanism for 1:n references. We need proxies not on the element level of the collection,but on the collection level. That is: not 100 proxies for 100 elements in the collection, but 1 Proxy for the complete collection.


bug fixes:

- TX serializable: one tx can't acquire read lock twice

- Bugs in inheritance mapping on one table

- Bugs in PB Server

- RsIterator bug with releaseDbResources

- ODMG tx checkpoint must rethrow exceptions

- Bug with updating objects that have only primary key fields ("UPDATE table WHERE col1=1 AND col2=2")


refactorings:

- Cache synchronization

0.7.310

new features:

- Support loading of OJB.properties and repository.xml as resources through a ClassLoader
- Implement IS NULL for OQL Queries
- Integrate new Criteria into OQL Parser
- TestCase for named roots map and Dlist
- TestCase for OQL Path expressions

bug fixes:

- Bugs in FK assingment and superfluous calls to broker.store()
- Bug in RsIterator::releaseDbResources
- Repair ObjectModification mechanism
- Identities must always refer to toplevel extent class or interface
- Bug in Named Roots Unbind
- Fix db-setup.sql for DB2 and Oracle
- Schema attribute belongs to table not to JDBCDescriptor !
- Fix bugs in OQL Parser (reading ints etc.)
- Bug in MetaObjectCacheImpl

refactorings:

- Rewrote PerformanceTest

0.7.325

new features:

- Optimistic locking support

- new Documentation: How to setup OJB for my Database

- Integrated a Log4J Logger Implementation

- Defined new Query classes that wrap SQL statements.

- Out of the box Compatibility with MS Access

- Provided a Performance TestSuite with a native JDBC Reference test

- field conversions are now also allowed for primary key attributes

- Enabled preprocessor to patch db-setup.sql for the target RDBMS


bug fixes:

- repository.dtd incorrect and repository.xml not valid

- BrokerPool returned same Broker several times

- GetCollectionByQuery() discards all Proxy candidates even if they match the target class

- DatabaseImpl does not implicitely lock objects after lookup()

- Bug req. 505178: Add jta-spec1_0_1.jar and parser.jar to classpath property in build.xml file

- Bug req. 503060: Include . In classbath of all scripts

- PersistenceBrokerException wraps original exceptions in a very poor way!

0.7.343

new features:

- Integrate Jakobs Refresh Relationships solution

- One Broker per ODMG transaction. We need a brokerpool for the singlevm mode.

- Provide a separate archive for contributions. This may include sample code, extensions, proposals and other stuff that is not included in the main distribution

- BLOB / CLOB support

- Support the SODA query API. Maybe it could solve as a replacement for the ojb.broker.query API

- Include package.html for package ojb.broker.cache

- Provide a flexible way to support multiple RDBMS platforms.


bug fixes:

- Provide default values for optimistic locking

- Bug in SqlIterator (superfluous call to readObjectArrayFrom())

- Bug req. 503372 PersistenceBroker still in Transaction after abort of an ODMG transaction.

- Bug in SQL Generator JoinInfo.asSqlClause

- Reference locking in TransactionImpl must use locking, not registering.

- Bug with Inheritance on one table

- Bug with Non-numeric Pks for M:N mapping

- Bug in cache invalidation in C/S mode? (local PersistenceBroker is NOT informed to remove object. I believe it is OK to do it this way. We have to clearify this.)

0.8.375

new features:

- Allow autoincrement for non-pk fields too

- Platform enhancements

- Improved "out-of-the-box" support for Informix and Oracle

- JTA Integration

- Proxies for 1:1 references

- Order of insert statements in ODMG transaction commit must not violate foreign key constraints on the database

- PersistentField implementation made configurable

- Introduce new Method PersistenceBroker::isInTransaction()

- Implemented a MySql platform

- New PersistenceBroker methods open(...) and close()

- Documentation: How to deploy the OJB binary distribution

- Provide escape charcters for addEqualTo()

- PersistenceBroker implementation is made configurable

- Integration for MS SQLServer

- Provide a OJB binary distribution "ojb.jar"

- Write a administrative console for the PB-Server

- Move mapping of OJB internal tables to separate repository file


bug fixes:

- Don't use Statement::getConnection for JDBC 1.0 drivers

- PersistenceBroker instance must always be returned to Factory

- Oracle problems with releaseDBResources

- Bugfix for Proxies implementing a hierarchy of interfaces

- Bugfix for LockStrategy lookup for Proxies

- Using wasNull to correctly detect null values from resultsets

- Avoid generation of proxies for null references

- Bug in StatementManager for Informix DB

- Bug : bind of OQL statement for "BETWEEN" criteria does not work properly.

- According to Jakob the counter should not be advanced after setting the first value.

- Eliminate compiler warning when using the OJB with the J2SDK 1.4


Refactorings:

- Performance optimization for getJdbcType()

- Improvement to PersistentField

- Factor out logging related stuff to new package ojb.broker.util.logging

- Use Crimson XML parser

- Use ANT 1.4.1

- Factor out sequence numbering related stuff to new package ojb.broker.util.sequence

- Factor out ManageableCollection related stuff to new package ojb.broker.util.collections

- Improvements to build.xml build file





$FOOTER$