changelog
progress of db4o development

2002-11-04
version 2.5
- db4o implements the S.O.D.A. query interface.
Further to the previous query-by-example functionality this now allows:
  - queries constrained by an unlimited number of different objects
  - queries greater/smaller/like
  - queries for object identity
  - queries for abstract classes and interfaces
  - ORs and ANDs between all query criteria
  - sorted queries
  - queries for null
S.O.D.A. provides a callback feature that allows calling any Java code during query execution. With the power of Java, queries of any degree of complexity may be constructed. In a client/server environment the callback code will be executed on the server side. Some 580 test cases are delivered with the db4o download to demonstrate the use of S.O.D.A.
- Weak reference memory management would not clean up references correctly in all cases. Fixed. Weak reference memory management can now be turned on and off with Configuration#weakReferences().
- The Defragment tool was tuned and modified slightly to cope with changed weak reference behaviour.
- Upon abnormal termination of a db4o session (JVM crash, debugger stop, computer crash or the like) all classes newly added since the last start of the engine could be lost. Fixed.
- The internal java.util.Hashtable translator was misconfigured and left over com.db4o.config.Entry objects upon updates and deletes. Fixed. All unnecessary com.db4o.config.Entry objects can be cleared out in a Defragment run.
- The Logger tool was moved to com.db4o.tools.
- Cascaded update and cascaded delete is now automatically passed on through member arrays, collections and maps to their child elements.
- Cascaded update (ObjectClass#cascadeOnUpdate()) would update one member too deep. Fixed.
- Cascaded delete (ObjectClass#cascadeOnDelete()) did not work for untyped fields. Fixed.
- ShutdownHook deinstallation did not work. This would result in additional threads on some JDK implementations upon multiple open and close calls within one JVM session. To reduce threads, db4o now pools all ObjectContainers to use one single shutdownHook in one VM session.
- On JDKs 1.4.x and above the database file is now locked by using NIO. This replaces the previous implementation that would create one Thread per opened database file. (An exception: NIO will not be used on Sun's JDK 1.4.0 for Linux because of a bug in the JDK implementation of FileChannel#tryLock(). The bug is fixed in JDK 1.4.1.)
- The above two modifications reduce thread creation drastically and ensure better performance and a consistent low memory footprint, even if a multitude of ObectContainers is rapidly opened and closed.
- On JDKs 1.2.x and above db4o now installs it's default ClassLoader from Thread.currentThread().getContextClassLoader(). With this setting it is possible to run db4o.jar in the ../jre/lib/ext/ directory of the JDK or in Tomcat's ../lib/ folder. The setting may be overridden by calling Db4o.configure().setClassLoader().
- Arrays stored to untyped Object variables (as in Collections) would loose some database filespace upon updates. Fixed.
- Discrete object array types stored to untyped variables would be instantiated as Object[]. Discrete object array types stored in an array type of a type derived from the declared type would be instantiated as the declared type. Fixed. 
- The client/server communication protocol was optimized to reduce the number of packets sent. The resulting performance improvement for client/server applications is dramatic, especially in low-bandwidth WAN applications.
2002-07-19
version 2.1
- All use of reflection functionality was refactored out of the core engine. By implementing the com.db4o.reflect.* interfaces, it is possible to replace the default java.lang.reflect.* wrappers with a custom implementation. Possible usecases:
  - Speed tuning
  - Running db4o on J2ME and other JVMs that do not support reflection.
- Automatic session shutdown in servlet sessions could fail in some cases. Fixed.
- MemoryFile speed can be tuned by setting initial size and enlargement parameters.
2002-04-02
version 2.0
- db4o now provides Client/Server functionality. See Db4o.openServer() and Db4o.openClient().
- db4o now comes with clean transaction support. Disk write operations were rewritten to ensure 100% fail-safety and clean ACID behaviour. ObjectContainer#commit() now commits the transaction associated with the ObjectContainer. ObjectContainer#rollback() was newly added.
- One single db4o.jar can now be run on all JDKs from 1.1.x to 1.4.x. The engine adjusts it's functionality to the available API methods automatically.
- Thread-safety was completely reengineered.
- The main API was refactored and split into two packages: com.db4o and com.db4o.ext. This allows the addition of an unlimited number of new features to com.db4o.ext while retaining lucidity in com.db4o. The ext() methods allow casting the respective Interface to full extended functionality.
- Every ObjectContainer can now be configured individually with ExtObjectContainer#configure(). Upon creation of an ObjectContainer with any of the open statements, the global Configuration context is copied to the new ObjectContainer.
- db4o can now also be run on in-memory files. See the documentation to ExtDb4o.openMemoryFile(). db4o operates approximately three times as fast on memory files than in normal RandomAccessFile mode. The feature may be useful to store db4o byte data to other databases or media.
- Cascaded activation, update and delete is now configurable per class and per field of a class.
- The servlet functionality has moved to ExtObjectContainer.objectContainer().
- The update depth can now be configured globally.
- Configuration#exceptionsOnNotStorable() can be turned on to analyse, if objects have storage problems due to a missing usable constructor or constructor code side events.
- Configuration#setClassLoader() allows the use of a custom class loader for stored classes.
- Configuration#refreshClasses() can be used to tell db4o to analyze all classes again in a running session.
- ExtObjectContainer#bind(Object object, long internalID) allows the association of an object in memory with the id of a stored object. The mechanism can be used to replace stored objects and to reassociate objects in a running session with their stored equivalents.
- The method setOut(PrintStream) was moved from the Db4o class to the Configuration class. Use Db4o.configure().setOut(PrintStream) or ObjectContainer#configure().setOut(PrintStream).
- The emergency shutdown mechanism now uses a JDK 1.3 shutDownHook instead of a response to finalize. This ensures a clean shutdown on CTRL + C. On JDKs 1.1.x and 1.2.x a shutdown is attempted in the finalizer.
- Classes implementing java.util.Collection would loose null elements. Fixed. The change will cause null objects to be contained in Collections if member elements are deleted independantly.
- Self references in member arrays could lead to exceptions. Fixed.
- Updating objects of classes derived from java.util.AbstractMap would leave over one object of the translated type com.db4o.config.Entry for every entry. Fixed.
- Endless loops were possible if callback events would call eachother. The behaviour was modified. Only one call on one callback method per object will be executed. 
- A timing problem in the engine shutdown could lead to the message "The database file is locked by another process." in a subsequent open. Fixed.
- com.db4o.samples now contains another subfolder "constructors" to demonstrate, how db4o decides, which constructor to use.
- ...and many, many more new features can be found in the JavaDocs.
2001-11-29
version 1.5
- Version 1.5 required a file format change. Conversion of old 0.4x to 1.4x database files takes place automatically upon opening a file for the first time. Since the modified files are not backward compatible to earlier versions, please back up your database files.
- db4o is now available in four versions: 
  - mobile edition (was: JDK 1.1.x)
  - community edition (was: standard edition)
  - professional edition (new)
  - dotnet edition for Microsoft's .NET platform
- db4o no longer needs to create a lock file. Locking takes place internally within the database file. For performance reasons, the mobile edition does not lock files. It is the responsibility of mobile developers to ensure that only one thread in one VM accesses a db4o database file.
- The new methods ObjectContainer#getID(Object) and ObjectContainer#getByID(long) allow the use of the very performant internal db4o IDs.
- db4o now distinguishes between Unicode and non-Unicode database files automatically. To store strings in the more performant and less space consuming ISO8859-1 format, call Db4o.configure().unicode(false) before creating a database file with the first call to Db4o.openFile().
- The new method ObjectContainer#isClosed() allows to determine if an ObjectContainer instance was closed by a previous call or a possible emergency condition like an OutOfMemoryError.
- The following deprecated methods were removed:
  - ObjectContainer#activate(Object) 
    Use:  ObjectContainer#activate(Object, depth) 
  - ObjectContainer#deactivate(Object)
    Use:  ObjectContainer#deactivate(Object, depth)
  - ObjectSet#current()
    You need to cache the result of ObjectSet#next() manually.
  - ObjectSet#isEmpty()
    Use:  ObjectSet#size() == 0
  - Db4o.echo(boolean)
    Use:  Db4o.configure().messageLevel(level)
- ObjectContainer#freeMemory() was renamed to ObjectContainer#purge().
- ObjectContainer#purge(Object) was added to allow more efficient memory management in the mobile edition version. 
- Synchronisation was removed from the JDK 1.1.x version (now mobile edition) to provide maximum performance.
- Upon an unexpected shutdown (typical: OutOfMemoryException) a subsequent call to Db4o.openFile() within the same JVM session could return the closed ObjectContainer. Fixed.
- Storing member objects explicitely with ObjectContainer#set() in objectOnNew callback methods (not necessary, since db4o recurses automatically) could lead to exceptions. Fixed.
- Storing objects with references to classes derived from themselves would lead to exceptions. Fixed.
- The db4o.jar format could not be used with Jikes and VAJ without unzipping it. Fixed.
- The professional edition comes with the following new features:
  - encryption
  - password protection
  - a servlet framework
2001-09-09
version 1.40
- JDK2 versions only: Memory management was greatly improved by switching to WeakReferences.
- Performance is not affected in a negative manner, since other improvements compensate the change easily. Performance should even appear to improve in most cases. The JDK 1.x versions also benefit from these changes.
- ObjectContainer#freeMemory() now allows to discard all clean object indices from memory. A call after ObjectContainer#commit() will achieve the lowest memory footprint possible.
- Using many commit() calls previously lead to more fragmentation of the database file than necessary. Fixed. As a result applications will produce drastically smaller database files.
- ObjectContainer#deactivate(Object, depth) can now be used to set all fields of any object to null / zero, even if the object is not stored to the ObjectContainer. This allows to use "naked" objects for queries, in spite of constructor or initialisation side effects, that set member variables.
2001-08-08
version 1.30
- Automatic activation to the respective default activation depth is now triggered by ObjectSet#next(). Applications that do not necessarily iterate through all results of ObjectSets may encounter drastic performance and memory usage improvements. Deactivating objects from within the iterator loop may be used to keep memory usage at a very low level. Note that the new lazy activation behaviour requires the ObjectContainer to remain open while the ObjectSet is used. 
- ObjectContainer#deactivate(Object, depth) now allows to cascade deactivation conveniently to any depth.
- ObjectContainer#deactivate(Object) is deprecated. ObjectContainer#deactivate(Object, 1) can be used instead.
- com.db4o.tools.Statistics can be used to print statistics about the used database file to System.out. All tools are distributed as sourcecode and they are not included in db4o.jar.
- com.db4o.tools.Defragment is a new tool to defragment database files. Read the documentation thoroughly and backup database files before using this tool.
- Configuration.messageLevel(int) now allows to specify, how detailed db4o is to log events. Possible levels are 0 to 3. Use Db4o.configure().messageLevel(3) for very detailed messages during debugging and to learn what is happening.
- Configuration.callbacks(boolean) now allows to turn ObjectCallback events off temporarily. This may be desirable for maintenance operations. The Defragment tool operates with callbacks turned off.
- Activation depth was partially inconsistent. Fixed.
- ObjectContainer#activate(Object, depth) and  ObjectContainer#deactivate(Object, depth) now also lead to the desired effect, if an array is passed as an argument.
- Exception handling was modified to prevent successful shutdowns on fatal errors like OutOfMemoryError or StackOverflowError.
- A major bug that could lead to database file corruption on the above fatal errors, CTRL + C and other abnormal database engine process terminations was fixed.
- Multidimensional arrays containing empty ([]) or zero ([0]) dimensions would produce exceptions. Fixed.
- ObjectClass#rename() was only possible, if an old version of the class was present. Fixed.
- com.db4o.samples now contains the subfolders "activate", "callbacks" and "update" with examples to explain activation and callback methods and the update behaviour of ObjectContainer#set().
2001-07-06
version 1.20
- All ObjectContainer methods are now threadsafe. Usage of db4o in Java Server Pages and servlets is now possible without additional synchronisation efforts.
- Db4o.openFile() now allows multiple calls with the same file name. Every call will return the same ObjectContainer. Every openFile() needs a corresponding ObjectContainer#close(). db4o will close the respective ObjectContainer on the last call.
- An additional file locking mechanism provides more safety in concurrency environments.
- Exception handling was enhanced to provide more developer information, for instance on using a closed ObjectContainer or on not being able to find a class in the CLASSPATH.
- All db4o versions now run on Tomcat. A special CLASSPATH issue: It is recommended to place db4o.jar in the WEB-INF\lib of your webapp and not to include db4o.jar in the global CLASSPATH.
- The RandomAccessFile patch for EPOC is now incorporated into the JDK 1.x standard versions. Accordingly a special EPOC version is not necessary anymore.
- JDK2 Collection classes would produce problems on certain JDKs. Fixed. Storing TreeMap and TreeSet objects now also persists possible custom Comparators.
- If not all previously used applications classes were accessible with Class.forName(className), some methods like ObjectContainer#get(null) would throw exceptions. Fixed. db4o now marks classes as unusable during startup and ignores objects of unavailable classes.
- The new ObjectConstructor extension of ObjectTranslator allows writing custom translators that construct the object.
- A translator that uses Java serialisation is now built into the engine. It can be optionally used to quickly implement persistence for classes with problematic constructors.
- The sourcecode of all built-in translators is delivered with the download in ../com/db4o/samples/translators.
- To ensure future compatibility with C# keywords, 2 ObjectTranslator method names were renamed:
   ObjectTranslator#in() >> ObjectTranslator#onStore()
   ObjectTranslator#out() >> ObjectTranslator#onActivate()
- The methods ObjectContainer#activate(object), ObjectSet#current() and ObjectSet#isEmpty() and Db4o.echo(boolean) are deprecated. See the documentation for replacements.
2001-06-07
version 1.10
- automatic activation on querying objects changed to preconfigured depth of 5, independent of the QBE example object, configurable globally and class-specific.
- additional ObjectContainer#activate(Object, depth) method to activate a tree of any size with one call.
- explicit commit() method for checkpoints.
- support for simple type wrappers in Object variables.
- support for multi-dimensional arrays.
- query evaluation mode changed to "contains" for arrays.
- support for Vector and Hashtable including "contains" queries.
- JDK 2 specific: 
   - support for all Collection classes including "contains" queries.
   - support for private or parameterised constructors.
   - support for inner classes.
- ObjectCallback methods to allow code execution upon storage events. Examples of use: cascaded delete, cascaded copy and cascaded update.
- Configuration interface for 
   - refactoring classnames and fieldnames.
   - customized activation depths.
   - customized update depths.
   - activation events.
   - translation of objects on storage and instantiation.
   - configurable storage of transient members.
   - ignoring fields in queries.
- automatic schema evolution now allows to change the data type of members.
- db4o used to store and restore static members and use them for query evaluation. Fixed.
- extreme regression tests allowed to find and fix some rare bugs that could occur on the deletion of objects.
- Java Web Start problem fixed.
- additional security handling to prevent user application code to open a database file twice.
- performance improvements > 10%.
- regression test code is included with the download.
2001-01-31
version 1.0
- completely revised interface.
- Smart reflection allows the storage of objects without any modifications to their class files.
- A JDK 2 version enables the storage of private and protected members.
- Unicode version.
- A dedicated EPOC version contains a workaround for an EPOC JVM bug.
- members of class Object are stored.
- Interface members are stored.
- storage wrapper for java.util.Date
2000-12-11
version 0.40
- fully revised architecture and file format.
- x50 performance boost.
- x50 decrease of database file size.
- x50 decrease in resource consumption.
- delete() is implemented.
- 20 samples allow a quick start.
- messages are off and can be turned on with echo()
2000-10-22
version 0.20
- The new db4o JDBC interface completely exports and imports object data. The mechanism allows the migration of db4o data in case of future changes to the db4o file format. The jdbc documentation provides further information.
- The provided sourcecode packages were revised.
- Fixes 0.11 to 0.13 are included.
2000-09-18
version 0.10
- db4o was repackaged. All classes are now found in com.db4o.*.
- The interface naming was streamlined. 
PersistentHandle >> DbHandle. 
getPersistentHandle() >> db().
- db4o is now distributed as a jar.
- Navigation through member links is now possible with PersistentObject.db().activate()
- Instantiation logic was rewritten to support this feature.
- The storage format was improved for less space consumption and better performance.
2000-08-20 - Support for inheritance.
- Test routines in com.db4o.test.Test.java ensure a consistent stability of implemented features.
2000-08-08 - db4o opens the public mailing list db4o@egroups.com.
2000-08-05 - Support for arrays.
- The schema updating mechanism is started automatically with every start of the engine.
2000-07-18 The indexing mechanism is implemented with a red-black binary tree.
A test with the benchmark database showed an improvement by more than 500%.
2000-07-08 - The read algorithm now only reads objects, which are actually needed.
- First concept of the db4o query interface
2000-07-06 First JDBC import run on an SQL database with 1 MB size. Large amounts of data are now available for testing and performance analysis.
2000-06-30 - Support for Double, double, Float, float, Short, short, Character, char, Boolean, boolean, Byte, byte.
- Rewrite of YapVariables to implement a clean structure instead of two objects per data type.
2000-06-23 Support for Long, long, Integer, int, Boolean and boolean.
2000-06-17 - Update is implemented.
db4o.set(object) forces a depth(1) equality check on all members.
- Address indirection is implemented.
see YapProxy for details
- Extensions of com.db4o.collection.Comparator avoid reflection in comparisons.
2000-06-15 joss is renamed to db4o. Thanks to Christian Runte for the suggestion.
2000-05-28get() and set() are implemented. Java classes with String- and Object-Members can be stored and retrieved.
2000-05-28Begin of this log.
2000-04-04 Thanks to Brian Lee Price for the contribution of ideas to yap.
2000-01-01The first line of code.