@version $Id$ ======================================================================== ObJectRelationalBridge -- Bridging Java Objects and Relational Databases ======================================================================== ObJectRelationalBridge (OJB) is an Object/Relational mapping tool that provides transparent transactional persistence for Java Objects against relational databases. OJB provides ODMG and JDO interfaces. --------------------------------------------------------------------- Release 1.0.1 --------------------------------------------------------------------- NEW FEATURES: - Add new service for Identity object creation - PersistenceBroker#serviveIdentity() This service makes creation of Identiy objects to lookup objects by primary key much easier. More info see PersistenceBroker Tutorial section "Find object by primary key". For example, to lookup an object by its Identity with PB.getObjectByIdentity, for a single Long PK field (with value '23') you can call: Identity oid = broker.serviceIdentity().buildIdentity(MyClass.class, new Long(23)); result = (MyClass) broker.getObjectByIdentity(oid); NOTES: - Changed build dependency from Sun's SCSL licensed J2EE specification jars to the Geronimo projects's ASL 2.0 licensed J2EE specification jars. Users now can build the core of OJB (everything but the jdori plugin) directly from the source tarball or CVS. CHANGES: - PersistenceBroker interface changed, add service method for IdentityFactory - Performance improvement in RsIterator, first only map PK values from the result set and check against the cache. If no match map all field values from result set to internal Map class (old version always maps all values from the result set to the internal Map class). - add in ObjectCacheDefaultImpl new attribute 'cachingKeyType' this allows to differ cached objects of same class for different databases. http://nagoya.apache.org/eyebrowse/ReadMsg?listName=ojb-user@db.apache.org&msgNo=13931 BUG FIXES: Please refer to our Bug tracking site (http://issues.apache.org/scarab/servlet/scarab/) under http://issues.apache.org/scarab/servlet/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. - fixed issue in AnonymousPersistentFieldForInheritance, class now use specified factory methods (in class-descriptor) for pc objects too - fix for OJB275, include PK fields for "super" class-descriptor when using "super" reference. Now on object insert, the PK values are copied from the main object to the temporary created "super" objects. - fixed issue in PersistenceBrokerFactorySyncImpl, always wrap requested PB instance with PB handle object - fixed issue in ObjectCachePerClassImpl, allow to set 'class-cache' to null - fixed issue with CollectionProxy and RemovalAwareCollection - RemovalAwareCollection is no longer the default collection-class for m:n-relationships - ManageableCollection#afterStore is only called if cascadeStoring is CASCADE_OBJECT - ojb no longer adds groupBy columns to the SELECT-clause, orderBy columns are still added because of sapdb - orderBy columns of the original query are used as joinAttributes in count-query - ALIAS-prefix again works for report-queries (see QueryTest#testReportQueryAlias) - odmg-api: Fix problem with TransactionExt#flush() call, always check for changed objects - odmg-api: Fix issue with FK assignment, referenced proxy object should not be materialized to assign FK in main object. - odmg-api: Fix Database#open(...) issue. In managed environments now no running JTA-tx was expected KNOWN ISSUES: - odmg-api: If a user exchange already existing objects in 1:n references without changing the size of the collection, the main object will not become dirty and the FK values of the exchanged objects will not be updated. E.g. two objects obj_1 anf obj_2 with 1:n reference to ref objects, each with one existing/persistent reference object, obj_1{ref_1} and obj_2{ref_2}. Lock objects and exchange the references in collection obj_1{ref_2} and obj_2{ref_1} and commit --> FK values of ref_1 and ref_2 will not be updated. - odmg-api: Creation of m:n relation only works when objects created step by step (or use PB-api as workaround), persist a whole object graph seems not to work proper. - Batch handling doesn't work proper with optimistic locking. This will be fixed in version 1.1 - Subqueries are not extent aware. see QueryTest#testSubQueryAgainstExtents --------------------------------------------------------------------- Release 1.0 --------------------------------------------------------------------- NEW FEATURES: -- NOTES: -- CHANGES: - We introduce new PersistentField implementations in OJB.properties file called PersistentFieldXXXXImplNew. Per default one of the new PersistentField implementations was used. If you hit problems please send a report. You can reverting to old impl by changing property 'PersistentFieldClass' in OJB.prperties file. The new versions has much better performance in read/write nested fields (up to 50 times faster than the 'old' implementions) and will replace the old classes on next version. Because PersistentField is an important kernel class we wait for community response before final replacement. BUG FIXES: Please refer to our Bug tracking site (http://issues.apache.org/scarab/servlet/scarab/) under http://issues.apache.org/scarab/servlet/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. KNOWN ISSUES: - The default ojb escape character '\' does not work for database using the same default as well and should therefore be double-escaped. As a workaround always use a custom escape character: LikeCriteria.setEscapeCharacter('|'); Criteria crit = new Criteria(); crit.addLike("firstname", "h%|%"); This issue is fixed for MySql and PostgreSql so far. - odmg-api: If a user exchange already existing objects in 1:n references without changing the size of the collection, the main object will not become dirty and the FK values of the exchanged objects will not be updated. E.g. two objects obj_1 anf obj_2 with 1:n reference to ref objects, each with one existing/persistent reference object, obj_1{ref_1} and obj_2{ref_2}. Lock objects and exchange the references in collection obj_1{ref_2} and obj_2{ref_1} and commit --> FK values of ref_1 and ref_2 will not be updated. - odmg-api: Creation of m:n relation only works when objects created step by step (or use PB-api as workaround), persist a whole object graph seems not to work proper. - ReportQueries should not be used with columns referencing Classes with extents: ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit); q.setAttributes(new String[] { "groupName", "sum(allArticlesInGroup.stock)", "sum(allArticlesInGroup.price)" }); q.addGroupBy("groupName"); ProductGroup.allArticlesInGroup points to class Article having multiple extents. As a workaround the query can be 'reversed' : ReportQueryByCriteria q = QueryFactory.newReportQuery(Article.class, crit); q.setAttributes(new String[] { "productGroup.groupName", "sum(stock)", "sum(price)" }); q.addGroupBy("productGroup.groupName"); Due to the fact the Article has extents multiple selects will be executed, so the same ProductGroup may show up more than once. Please see the testcases QueryTest#testReportQueryGroupByExtents1 and QueryTest#testReportQueryGroupByExtents2. - A count on ReportQueries containing groupBy does not deliver a correct result. - Batch handling doesn't work proper with optimistic locking. This will be fixed before long after 1.0 --------------------------------------------------------------------- Release 1.0 rc7 --------------------------------------------------------------------- NEW FEATURES: NOTES: - OJB.properties file has changed, don't forget to replace on update! Among other things the property 'ImplementationClass' was needed to set in managed environments. CHANGES: -OJB.properties file new properties: ListProxyClass IndirectionHandlerClass SetProxyClass RowReaderDefaultClass ImplementationClass The logging properties moved to a separate file - see below. - Logging settings have moved to separate OJB-logging.properties file - Logging initialization is now decoupled form OJB initialization; this is described in the new reference guide for logging - It is no longer necessary to provide an empty repository.xml file when starting without repository and connection descriptors - rename/move internal package org.apache.ojb.odmg.transaction to org.apache.ojb.broker.transaction.tm In managed environments each (top-level) API use transaction manager access, thus the TM related classes are moved to the PB kernel and OJB.properties entries change. - Base class for ODMG api access within non- or managed environments is now org.apache.ojb.odmg.OJB. The used org.odmg.Implementation interface implementation is specified in OJB.properties. - ConnectionManager is more strict on CM.releaseConnection() method calls. Now an exception is thrown when CM is in a "local transaction" status when try to release the connection. The local tx status of ConnectionManager and PersistenceBroker implementation is now decoupled, useful in managed environments allows to "close the connection" without change the PB tx-state. - the indirection handler (for reference proxies), and the list and set proxy classes can now be configured in the OJB.properties file - new CollectionProxy interface introduced to allow the ODMG api to make use of alternate collection proxy implementations. BUG FIXES: Please refer to our Bug tracking site (http://issues.apache.org/scarab/servlet/scarab/) under http://issues.apache.org/scarab/servlet/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. KNOWN ISSUES: - odmg-api: If a user exchange already existing objects in 1:n references without changing the size of the collection, the main object will not become dirty and the FK values of the exchanged objects will not be updated. E.g. two objects obj_1 anf obj_2 with 1:n reference to ref objects, each with one existing/persistent reference object, obj_1{ref_1} and obj_2{ref_2}. Lock objects and exchange the references in collection obj_1{ref_2} and obj_2{ref_1} and commit --> FK values of ref_1 and ref_2 will not be updated. - odmg-api: Creation of m:n relation only works when objects created step by step (or use PB-api as workaround), persist a whole object graph seems not to work proper. - ReportQueries should not be used with columns referencing Classes with extents: ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit); q.setAttributes(new String[] { "groupName", "sum(allArticlesInGroup.stock)", "sum(allArticlesInGroup.price)" }); q.addGroupBy("groupName"); ProductGroup.allArticlesInGroup points to class Article having multiple extents. As a workaround the query can be 'reversed' : ReportQueryByCriteria q = QueryFactory.newReportQuery(Article.class, crit); q.setAttributes(new String[] { "productGroup.groupName", "sum(stock)", "sum(price)" }); q.addGroupBy("productGroup.groupName"); Due to the fact the Article has extents multiple selects will be executed, so the same ProductGroup may show up more than once. Please see the testcases QueryTest#testReportQueryGroupByExtents1 and QueryTest#testReportQueryGroupByExtents2. - A count on ReportQueries containing groupBy does not deliver a correct result. - Batch handling doesn't work proper with optimistic locking. This will be fixed before long after 1.0 --------------------------------------------------------------------- Release 1.0 rc6 --------------------------------------------------------------------- NEW FEATURES: - NOTES: - Repository.dtd has changed, don't forget to replace this file - Upgraded to the new Apache License, Version 2.0 - No support for HSQLDB 1.7.2RC1 yet - No support for Torque 3.1 yet - Add new PersistenceBrokerFactory implementation for use in managed environments when *only* the PB-api was used and participation in JTA transaction via Synchronization interface is needed. - Add new configuration property 'autoSync' to ObjectCacheDefaultImpl. Used to enable a simple synchronization mechanism to keep cache in sync with DB - Add new attribute values for reference-/collection-descriptor auto-update/-delete attribute. Now we have five possible values: none, link, object, true, false. The true, false values are now deprecated but will NOT be removed in near future (so don't panic!). CHANGES: - fix bug in internal table OJB_HL_SEQ, column type of MAX_ID was INTEGER but needs BIGINT to support Long on java side - no longer throw an exception when calling abortTransaction more than one time or an internal rollback (by ConnectionManager on the used connection) was already done - Add object-cache tag in standard jdbc-connection-descriptor in repository_database.xml to enable new 'autoSync' property of ObjectCacheDefaultImpl for all operations made by this DB connection - Allow infinite lifetime of cached objects in ObjectCacheDefaultImpl (handle with care ;-)) - odmg-api implementation, disable restore of transient objects on transaction abort, because we can't really restore the whole object with all references - now using ANTLR 2.7.2 and Unicode support in OQL queries - now using ANT 1.6.0 - RelationshipPrefetcher no longer modifies auto-retrieve setting of Relationship-Descriptor. This may result in additional sql-queries but is safer in a multi-threaded environment. - Added column methods to Criteria. addColumnEqualTo, addColumnIn etc. The column parameter of these methods will not be translated during sql-generation. These methods are mainly used for internal purpose. BUG FIXES: Please refer to our Bug tracking site (http://issues.apache.org/scarab/servlet/scarab/) under http://issues.apache.org/scarab/servlet/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. - fix bug in MetadataManager, when 'per thread changes' is enabled and many different DescriptorRepository instances were used, gc can't collect unused instances because StatementManager doesn't release references to used DescriptorRepository instances. - fix bug in ObjectCacheDefaultImpl, it doesn't make sense to use a soft reference for the object wrapper of the cached object. Use a softreference for the cached object instead - fix bug in CacheDistributor (internal used ObjectCache implementation), each CacheDistributor instance have to held ObjectCache instances for the associated PersistenceBroker instance - fix documentation bug in ObjectCacheDefaultImpl, property 'timeout' use seconds instead of milliseconds - fix bug in new DList implementation (DListImpl_2), materialization of objects failed when DList instance itself was persisted (using db.bind(...)) and re-loaded within tx, but iteration over the list values was done outside of the tx - The bogus ODMG Distributed Lockmanagement feature has been replaced by a new Servlet based LockServer. Transaction isolation should now work properly even accross a cluster of JVMs. - fix bug in MtoNCollectionPrefetcher, multi-key handling is now supported. - ClassCastException with ManageableCollection implementations on m:n relation. m:n relation now can handle ManageableCollection collection classes in a correct way, the collection class no longer needs to implement java.util.Collection. KNOWN ISSUES: - odmg-api: It is not possible to exchange objects in 1:n references. E.g. two objects with 1:n reference, each with one reference object, obj_1{ref_1} and obj_2{ref_2}. Lock objects and exchange the references in collection obj_1{ref_2} and obj_2{ref_1} and commit. --------------------------------------------------------------------- Release 1.0 rc5 --------------------------------------------------------------------- This is the last planned rc before the 1.0 release. If there are no major bugs this release will be relabled as 1.0 after two weeks. NEW FEATURES: - With this release we are feature complete for the 1.0 release! For 1.0 you should not expect more features to be added. NOTES: - slight changes in repository.dtd, OJB.properties were made - internal kernel interface method signature changed: in JdbcAccess two method signatures change in StatementManagerIF one method signature change These changes are necessary to fix a "design bug" in handling of jdbc type metadata. See discussion on dev-list "[VOTE] Design bug fixed - check in?" - ObjectCache implementation classes constructor arguments change. We now pass a Properties argument too. Allows to set configuration properties for each ObjectCache instance - changed the JDORI plugin to now use the latest 1.0.1 version of the JDO reference implementation. - OJB is now very strict in handling RsIterator instances. RsIterator is bound very closely to the used PersistenceBroker instance. Thus if you do a PersistenceBroker#close PersistenceBroker#commitTransaction PersistenceBroker#abortTransaction call, the current RsIterator instance resources will be cleaned up automatic and invalidate current instance. CHANGES: - add possibility to declare ObjectCache implementation on class-descriptor and jdbc-connection-descriptor level (means per class and per database connection) too - add a new interface called org.apache.ojb.odmg.TransactionExt to make additional proprietary methods available for user by casting org.odmg.Transaction to TransactionExt - behaviour of org.odmg.Transaction#checkpoint() changed. Now the database transaction was commited when checkpoint was called, seems this is more in unison with ODMG spec: " Calling checkpoint commits persistent object modifications made within the transaction since the last checkpoint to the database." If you want to flush persistent object modifications made within the ODMG transaction to the underlying database transaction without commit the changes (old behaviour of checkpoint()), please cast Transaction to TransactionExt and use new method flush(). - make odmg collections pluggable via OJB.properties file - Restructuring and further enhancements of the documentation. BUG FIXES: Please refer to our Bug tracking site under http://scarab.werken.com/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. - fix ClassLoader problem when merging DescriptorRepository instances - fixed the JDORI problems with loading object via extend based queries. now objects are brought under JDO control and equipped with a statemanager in the load process. --------------------------------------------------------------------- Release 1.0 rc4 --------------------------------------------------------------------- NEW FEATURES: - With this release we are feature complete for the 1.0 release! For 1.0 you should not expect more features to be added. - added a XDoclet OJB Module that allows to generate repository.xml and DDL from tagged Java sources to the "contrib" distribution. - added an OJB Taglib that allows to use OJB directly from JSP pages to the "contrib" distribution. NOTES: - update used xdoclet version in 'ejb-examples' (see section deployment/'Build the OJB sample session beans') to version 1.2xx CHANGES: - Enhance MetadataManager, add new methods, simplify handling of different persistent object metadata profiles (means different org.apache.ojb.broker.metadata.DescriptorRepository instances) at runtime - Provide a PUBLIC doctype declaration for the repository.xml - add a convenience Constructor to QueryByCriteria that builds a query selecting all instances of a class - add isClosed() method to PersistenceBroker interface to check if a broker instance was already closed. - make OJB more strict in handling closed PersistenceBroker instances. Now it's not any longer possible to use closed PersistenceBroker instances. - Package ...metadata.fieldaccess refactored/changed. Now all PersistentField implementations support 'nested fields'. See new entries in OJB.properties file. - added new sections to documentation BUG FIXES: - fix several bugs in documentation - fixed writing to memo columns in MS Access - fixed optimistic locking problem - fixed jdo tutorial setup Please refer to our Bug tracking site under http://scarab.werken.com/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. --------------------------------------------------------------------- Release 1.0 rc3 --------------------------------------------------------------------- NEW FEATURES: - With this release we are feature complete for the 1.0 release! For 1.0 you should not expect more features to be added. NOTES: - Intern table OJB_HL_SEQ (used by SequenceManagerHighLowImpl) has changed! Now need an additional column 'VERSION' of type INTEGER When updating from earlier version drop/reinstall table with additional field - PersistenceBrokerAware interface changed, methods beforeStore and afterStore split into xxxInsert/xxxUpdate methods, all methods now expect an PersistenceBroker argument - PersistenceBrokerListener interface replaced by PBStateListener - ManageableCollection interface add new method afterStore(...) - Remove obsolete method 'invalidate(Identity oid)' from PB-api CHANGES: - enhanced PB-api listener classes - unified handling of events in PB-api - adapt sequence manager implementations using 'long' instead 'int' keys - SequenceManagerHighLowImpl now use optimistic locking to support sequencing across different JVM (except j2ee conform app server, see sequence manager doc). - Add new attribute 'autoNaming' to sequence manager implementations. Now the implementations allow to switch on/off auto-generating of sequence names - merging the three package o.a.ojb.broker.ta, .singlevm and .server into a new package o.a.ojb.broker.core BUG FIXES: - fixed problems with the JDO FieldManager to work with 1:1, 1:n and m:n associations - OJB143, OJB152, OJB153, OJB156, OJB158, OJB159, OJB161 Please refer to our Bug tracking site under http://scarab.werken.com/scarab/issues/id/OJBxxx to see details for a bug with id OJBxxx. --------------------------------------------------------------------- Release 1.0 rc2 --------------------------------------------------------------------- NEW FEATURES: - With this release we are feature complete for the 1.0 release! For 1.0 you should not expect more features to be added. CHANGES: - improve cache package. Now the used cache is no longer a singleton. - Add CacheFilter interface to allow easy pre-filtering of cache methods. - Add Support for anonymous fields - Several improvements to SQL generation - improved handling of optimistic lock exceptions in ODMG BUG FIXES: - lots --------------------------------------------------------------------- Release 1.0 rc1 --------------------------------------------------------------------- NEW FEATURES: - With this release we are feature complete for the 1.0 release! For 1.0 you should not expect more features to be added. CHANGES: - improved handling for non-distributable jars - MetadataManager: new methods, allow merge of new ConnectionDescriptor and RepositoryDescriptor (read from any repository file at runtime) with the existing ones. - add custom attribute support for DescriptorRepository and JdbcConnectionDescriptor. BUG FIXES: - repaired tutorial applications - fixed several bugs in the JDO RI plugin - compilation works for jdk 1.2 and 1.3 again - connection problem when using PBKey only with jcdAlias name (e.g. PBKey("myAlias")), now the user and password set in the repository file was used. - add jcdAlias support for tutorial 1+2 More information is available at http://db.apache.org/ojb Copyright (c) 2000 - 2003 Thomas Mahler, et al.