|  |  |  | License Codehaus OpenEJB OpenJMS OpenORB Tyrex

Old releases
General
Release 1.3
Release 1.3rc1
Release 1.2

Main
Home
About
Features
Download
Dependencies
Reference guide
Publications
JavaDoc
Maven 2 support
Maven 2 archetypes
DTD & Schemas
Recent HTML changes
News Archive
RSS news feed
Project Wiki

Development/Support
Mailing Lists
SVN/JIRA
Contributing
Support
Continuous builds
Prof. services

Related projects
Spring ORM support
Spring XML factories
WS frameworks

XML
XML

XML Code Generator
XML Code Generator

JDO
Introduction
First steps
Using JDO
JDO Config
Types
JDO Mapping
JDO FAQ
JDO Examples
JDO HOW-TOs
Tips & Tricks
Other Features
JDO sample JAR

Tools
Schema generator

Advanced JDO
Caching
OQL
Trans. & Locks
Design
KeyGen
Long Trans.
Nested Attrs.
Pooling Examples
LOBs
Best practice

DDL Generator
Using DDL Generator
Properties
Ant task
Type Mapping

More
The Examples
3rd Party Tools
JDO Tests
XML Tests
Configuration

About
License
User stories
Contributors
Marketplace
Status, Todo
Changelog
Library
Contact
Project Name

## Release notes for releases 0.9.7 and earlier

Releases

## Releases

For all releases prior to 0.9.6, the release notes can be found here.

# Release 0.9.7

Description: | Maintenance release for Castor XML and JDO
released: | June 8, 2005
managed by: | Werner Guttmann

## Download & installation instructions

This is the final 0.9.7. release, mainly a maintenance release. We are currently planning the next release which will be Castor 0.9.9, a feature release.

## Changes

### Moved key generators to jdo.keygen package

Whilst this change is non-intrusive per se, please note that you might have to change a local `castor.properties` file if you happened to re-specify key generators in there.

### Fixed problem with multiple <database> configurations

Support for multiple database configurations has been re-enabled.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---
1147 | 20050607 | Werner Guttmann | Werner Guttmann | Reverted addition to src/tests/jdo/Collections due to problem with missing setItem(ArrayList). | Bug |  | General
1138 | 20050530 | Werner Guttmann | Werner Guttmann | Moved key generators to jdo.keygen package. | Bug |  | General
881 | 20050530 | Nick Stuart | Ralf Joachim | JDOManager can now handle more then one jdo-conf. Reporter: Nick Stuart | Bug |  | JDO
1131 | 20050525 | Werner Guttmann | Werner Guttmann | Update project documentation. | Bug |  | General

# Release 0.9.7M1

Description: | Milestone release for 0.9.7
released: | May 25, 2005
managed by: | Werner Guttmann

## Download & installation instructions

Please note that we are providing the usual suspect (binaries, docs and sources) for this release at the Codehaus. We recommend, though, to download the complete package, as the HTML docs at the main Castor site has not been updated, and to build the documentation yourself.

## Changes

### Support for JDBC proxy classes

Proxy classes for `java.sql.Connection` and `java.sql.PreparedStatement` instances have been added, to allow for complete and better JDBC statements to be output to the log files. As this might impose a performance penalty at run-time, we have added a new property to the Castor property file (`castor.properties`) to allow configuration of this feature.

      # True if JDBC proxy classes should be used to enable more detailed logging output of SQL
      # statements; false otherwise (logging will be turned off completely).
      #
      org.exolab.castor.persist.useProxy=true

When disabled, no logging of SQL statements will occur al all.

### Castor and Java 5

Several bugs have been fixed to allow use of Castor with a JDK 1.5. This mainly involved preventing compilation problems due to variable names et al. that were in conflict with new Java 5 naming conventions (e.g. use of enum as a variable name).

### Renamed JDO2 to JDOManager

`JDO2` has been renamed to `JDOManager`. Please change your source code accordingly. Please note that - going forward - any bug fixes/enhancements will be committed against JDOManager only.

### Type of access mode constants changed

The type of the access mode constants (Shared / ReadOnly / Exclusive / DbLocked) defined in Database interface has changed from

    short

to

    org.exolab.castor.mapping.AccessMode

. To allow you to use previous short as well as new AccessMode constants we added new incarnations of the Database.load(..) and Query.execute(..) methods. In addition we needed to change the parameter types of Persistent.jdoLoad(..) and CallbackInterceptor.loaded(..) from short to AccessMode.

### Default field types

It is possible again - after disabling this feature in 0.9.6 - to not specify a type in a field mapping. By default, a field defined as such will have a type of 'java.lang.String'.

## Additions

### Addition of RSS feed for announcements

An RSS feed has been added to the project documentation to allow users to be informed about additions/changes to Castor. This feed basically mirrors the news items posted to <url>http://castor.codehaus.org/news.html</url>

### Specifying a binding file with the Source generator Ant task

Support for specifying a binding file with the Castor Source Generator Ant Task has been added. Below is the example as provided with the 0.9.6 release notes extended to cover the specification of a binding file:

      <target name="castor:gen:src" depends="init"
        description="Generate Java source files from XSD.">

        <taskdef name="castor-srcgen"
          classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
          classpathref="castor.class.path" />
        <mkdir dir="${gen.src.d}" />
        <castor-srcgen file="${schema.d}/books2.xsd"
          todir="${gen.src.d}"
          package="com.sourcebeat.castorlive.xmodel"
          types="j2"
          bindingfile="custom-binding.xml"
          warnings="false" />
      </target>

## Problems fixed

Since release 0.9.6, the following problem areas have been addressed.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---
938 | 20050521 | Andrew Fawcett | Hendrik Schreiber | Anonymous groups in complex types are disambiguated unnecessarily Reporter: Hendrik Schreiber | Bug |  | XML
664 | 20050521 | Andrew Fawcett | Heri Bender | Extra element not ignored in UnmarshalHandler.startElement although it should be ignored. Reporter: Heri Bender | Bug |  | XML
1048 | 20050521 | Andrew Fawcett | Andrew Fawcett | Added support for multi-value attributes Reporter: Andrew Fawcett | Bug |  | XML
1134 | 20050520 | Werner Guttmann | Werner Guttmann | Restore default behaviour when no type is specified for a field mapping | Bug |  | JDO
1129 | 20050519 | Stein M. Hugubakken | Werner Guttmann | Changed column names in SQL statement of CallSql to lower-case. | Bug |  | JDO
1111 | 20050517 | Werner Guttmann | Werner Guttmann | Changed documentation from JDO2 to JDOManager. | Bug |  | JDO
1116 | 20050517 | Werner Guttmann | Werner Guttmann | Replaced Ant 1.5 with Ant 1.6.x. | Bug |  | JDO
1112 | 20050517 | Werner Guttmann | Werner Guttmann | Added documentation about JDBC proxy classes (incl. property in castor.properties). | Bug |  | JDO
973 | 20050517 | Emir Causevic | Werner Guttmann | Changed column name 'num' to 'numb', as 'num' happens to be a keyword with SAPDB. | Bug |  | JDO
65 | 20050511 | Jene Jasper | Jene Jasper | Added patch to allow CastorSourceGenTask to specify a binding file. | enhancement |  | Tools
1063 | 20050511 | Ralf Joachim | Ralf Joachim | Refactor CTF-JDO tests into subdirectories (part 1). Reporter: Ralf Joachim | Ref. |  | JDO
973 | 20050511 | Werner Guttmann | Werner Guttmann | build.xml now uses sourc generator Ant task definitio during code generation. | Enh |  | JDO
1105 | 20050509 | Andrew Fawcett | Andrew Fawcett | Issues with Namespace Handling in SAX2Any and AnyNode2SAX2 Reporter: Andrew Fawcett | Enh. |  | XML
1104 | 20050506 | Andrew Fawcett | Andrew Fawcett | Added Java 5 "enum" support to Java Source API Reporter: Andrew Fawcett | Enhancement |  | XML
1050 | 20050506 | Thomas Zooman | Andrew Fawcett | Added ability to add exceptions to JConstructor. Reporter: Thomas Zooman | Bug |  | XML
1596 | 20050503 | Keith Visco | Keith Visco | Fixes issue with using location attribute with both attributes and text nodes the same location element. Reporter: George ?? | Bug |  | XML
954 | 20050503 | Werner Guttmann | Werner Guttmann | Added proxy classes for JDBC Connection and PreparedStatement to improve SQL statement logging. | Bug |  | JDO
1097 | 20050502 | Emir Causevic | Ralf Joachim | Added cast of null needed for some reflection methods for Java5. Reporter: Emir Causevic | Bug |  | JDO
1098 | 20050502 | Emir Causevic | Ralf Joachim | Fixed compile error on Java5 caused by the usage of "enum" as identifier in JDO tests. Reporter: Emir Causevic | Bug |  | JDO
1082 | 20050430 | Werner Guttmann | Werner Guttmann | Improve the error messages related to the use of key generators. | Bug |  | JDO
1084 | 20050430 | Werner Guttmann | Werner Guttmann | Reworked the Cache interface to be 100% compliant with java.util.Map. | Bug |  | JDO
1088 | 20050429 | Tim Telcik | Werner Guttmann | Improved the way Castor JDO logs error messages if a transaction fails. | Bug |  | JDO
880 | 20050427 | Martin Fuchs | Werner Guttmann | Added java.sql.Connection getJdbcConnection() to Database interface to obtain a handle to the underlying JDBC connection. Reporter: Martin Fuchs | Enh |  | JDO
1081 | 20050425 | Bruce Snyder | Bruce Snyder | This required the refactoring of all key generators to extract the supportsSqlType() method which is now called early rather than late from within the SQLEngine constructor. | Bug |  | JDO
1086 | 20050425 | Bin Liu | Werner Guttmann | Added type casts to Types.java to overcome runtime exceptions with Java 1.4.x. Reporter: Werner Guttmann | Bug |  | JDO
1712 | 20050424 | Gregory Block | Ralf Joachim | Improved logging of exceptions related to security policy at Configuration. Reporter: Gregory Block | Bug |  | All
1781 | 20050424 | Martin Fuchs | Ralf Joachim | Added JDOManager.loadConfiguration(JdoConf). Reporter: Martin Fuchs | Enh. |  | JDO
1865 | 20050421 | Ralf Joachim | Ralf Joachim | Multiple <database> problems. Reporter: Nick Stuart | Enh. |  | JDO
1933 | 20050417 | Ralf Joachim | Ralf Joachim | Refactor AccessMode. Reporter: Ralf Joachim | Ref. |  | All
1730 | 20050408 | Roy van der Kuil | Keith Visco | Committed: more information on error when manipulating collections Reporter: Roy van der Kuil | Enhancement |  | XML
1929 | 20050408 | Stefan Rotman | Ralf Joachim | Fixed CastorException prints "Caused by: " to System.err in all cases. Reporter: Stefan Rotman | Bug |  | All
1491 | 20050407 | Stein M. Hugubakken | Stein M. Hugubakken | Test for open transaction before closing it. Reporter: Stein M. Hugubakken | Bug |  | JDO
1860 | 20050406 | Ralf Joachim | Ralf Joachim | Rename JDO2 to JDOManager. Reporter: Ralf Joachim | Ref. |  | JDO
1820 | 20050406 | Werner Guttmann | Ralf Joachim | Add template for submitting a bug report. Reporter: Werner Guttmann | Enh |  | All
1214 | 20050402 | Werner Guttmann | Ralf Joachim | Fixed problem in field molder when dealing with 'set' methods with more than one signature. Reporter: Howard Pelling | Bug |  | JDO
1903 | 20050324 | Stein M. Hugubakken | Stein M. Hugubakken | Surrounded logging-statements with isDebugEnabled() if the logging-string is assembled. Reporter: Stein M. Hugubakken | Bug |  | All
1916 | 20050330 | Tim Telcik | Ralf Joachim | Fixed typo in transaction manager class for WAS v4 and add note that database pooling should be enabled for WAS v4 and v5. Reporter: Tim Telcik | Bug |  | JDO
1917 | 20050330 | Tim Telcik | Ralf Joachim | Fixed misleading error messages referencing to "javax.jta.TransactionManager" instead of "javax.transaction.TransactionManager". Reporter: Tim Telcik | Bug |  | JDO
1691 | 20050320 | Martin Fuchs | Martin Fuchs | Extend FieldHandlerImpl to be able to handle multiple overloaded set methods. This now makes possible to specify the pooling parameter "cache-scheme" for Oracle connects. | Bug |  | JDO
1889 | 20050318 | Ralf Joachim | Ralf Joachim | Fixed bug with cryptic message at 1:m relation with depends relationship. Reporter: Hugo Ferreira | Bug |  | JDO
1882 | 20050312 | Ralf Joachim | Ralf Joachim | Fixed failure in hash code calculation of org.exolab.castor.persist.spi.Complex. Reporter: Ralf Joachim | Bug |  | JDO
1851 | 20050307 | Werner Guttmann | Werner Guttmann | Added RSS news feed | Enh |  | All
1852 | 20050307 | Nick Stuart | Werner Guttmann | Fixed Compile issue on JDK 1.5.0_01. | Bug |  | JDO
1896 | 20050305 | Martin Fuchs | Martin Fuchs | Elimination of unnecessary compiler warnings. | Enh. |  | Misc
1877 | 20050217 | Werner Guttmann | Werner Guttmann | Fixed wrong class and method name for Websphere 5.0 transaction manager factory. | Bug |  | JDO

# Release 0.9.6

Description: | Bug fixes in Castor JDO, XML.
released: | February 9, 2005
managed by: | Werner Guttmann

### Status

This is the final 0.9.6. release. We are currently planning the next milestone release which will be Castor 1.0.

### New Documentation

- Creating Custom FieldHandlers

### Summary

Final release. Since the third release candidate, the following problem areas have been addressed.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---
1873 | 20050303 | Gregory Block | Gregory Block | Updated documentation to explain that no auto-mapping of java.util.Date takes place; users must decide whether to map a particular date field to java.sql.Date, java.sql.Time, or java.sql.Timestamp. | Bug | JDO | Core
1855 | 20050208 | Ralf Joachim | Werner Guttmann | Fixed problem with TransactionContext.getObjectEntry(Object) that was introduced as a result of adding support for lazy loading 1:1 relations. | Bug | JDO | Core
1849 | 20050204 | Ralf Joachim | Werner Guttmann | Added F.A.Q. entry describing compatibility problems between various releases of mySQL 4.1.x and its JDBC drivers. | FAQ | JDO | Docs
1848 | 20050204 | Werner Guttmann | Werner Guttmann | Reverted various DOCTYPE definitions in src/tests/jdo to use DTDs. |  | JDO | Tests

----

20050118

Keith Visco

Keith Visco

Fixed issue with GeneralizedFieldHandler not able to handle collections. Collections are now automatically iterated over during getValue() calls and each item in the collection is passed into the convertUponGet method. To retain the old behavior simply add a call to #setCollectionIteration with a value of false in the constructor of your GeneralizedFieldHandler. The behavior for setter methods is not changed since only one item at a time is passed into the setter already.

Enh.

XML

Mapping

1850 | 20050114 | Keith Visco | Keith Visco | Fixed whitespace processing bug, where a ' ' was actually getting appended to the end of a string value if the parser was calling the #characters method again with only whitespace following a previous call to #characters method where valid content existed. Reporter: Paul Spencer | Bug | XML | XML
---- | 20050110 | Keith Visco | Keith Visco | Fixed recent issue where ElementDecl#getType() method was always returning null for element references. | Bug | XML | XML

# Release 0.9.6 RC3

Description: | Bug fixes in Castor JDO, XML
released: | January 11, 2005
managed by: | Werner Guttmann

Preparations for the final release have started. Since the second release candidate, the following problem areas have been addressed.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---
1839 |  | Stein M. Hugubakken | Werner Guttmann | Added getCacheManager() method in Database interface | Enh. | JDO | Caching
1798 |  | Keith Visco |  | Fixed problem with loading mappings with relative path | Bug | JDO | Tests
1372 | 20041217 | Keith Visco | Keith Visco | Mapping.loadMapping(String) duplicates directory path. Fixed problem by making the given url a relative URL so that the document base isn't duplicated. | Bug | All | Core
1824 |  | Keith Visco | Werner Guttmann | Fixed various problems that prevented compilation under JDK 1.3. | Bug | JDO | Core
1827 |  | Stein M. Hugubakken | Werner Guttmann | Fixed syntax error in src/tests/jdo/mysql.sql. | Bug | JDO | Tests
1815 |  | Patrick vanKann | Werner Guttmann | Improved exception handling during TransactionContext instantiation. | Bug | JDO | JDO
1725 |  | Jeff Bonevich | Werner Guttmann | Changed attribute type for 'name' attribute on key-generator element definition in mapping.dtd. | Bug | JDO | Core
1768 |  | Ralf Joachim | Werner Guttmann | Overloaded jdo.Size with Oracle-specific test case. | Bug | JDO | Tests
1812 | 20041214 | Gregory Block | Werner Guttmann | Various problems with classloader usage. | Bug | JDO | Core
1793 | 20041213 | Martin Fuchs | Werner Guttmann | SimleQueryExecutor and data visibility issues | Bug | JDO | JDO
1723 | 20041210 | Keith Visco | Keith Visco | Added some additional support for nillable fields. There is still some more work needed in this area, but this gets us closer. | Enh. | XML | XML
---- | 20041210 | Keith Visco | Keith Visco | Added initial support to suppress namespaces during Marshalling. This has been a long asked for feature, so I figured it was about time I finally got around to doing this. | Enh. | XML | XML

# Release 0.9.6 RC2

Description: | Mainly bug fixes, but also minor enhancements in Castor JDO.
released: | December 03, 2004
managed by: | Werner Guttmann

### Open issues:

There's an issue with Castor finding mapping files within JARs when the path to the mapping file is specified relatively to the JDO configuration file. We are working on this, but as there's a workaround (using InputSources as mentioned on the mailing lists recently), we have decided to go ahead and not hold back this second release candidate. Details on this bug can be found here.

Since the first release candidate, the following problem areas have been addressed.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---
1560 | 20041214 | Keith Visco | Keith Visco | Fixed NullPointerException thrown during Castor Validation | Bug | XML | XML
1676 |  | Werner Guttmann | Werner Guttmann | Added support for lazy-loading simple 1:1 relations | Enh. | JDO | JDO
1777 |  | Patrick vanKann | Werner Guttmann | Status property of Castor's TransactionContext not set correctly in global transactions. | Bug | JDO | JDO
1804 |  | Martin Fuchs | Werner Guttmann | Castor JDO test suite now uses log level "error" by default. | Enh. | JDO | JDO
1795 |  | Gregory Block | Werner Guttmann | Fixed problem in CastorException? (String, Throwable) where the constructor of the superclass was not called. | Bug | JDO | Core
1797 |  | Ralf Joachim | Werner Guttmann | Fixed problem with resetting the capacity of CountLimited? cache. | Bug | JDO | JDO
1774 |  |  | Werner Guttmann | Fixed problem with "sqltime" field type where it was incorrectly mapped to java.sql.Date rather than java.sql.Time. | Bug | JDO | JDO
1790 |  | Martin Fuchs | Werner Guttmann | Added additional debug statements during binding of SQL parameters. | Enh. | JDO | JDO
1785 |  | Martin Fuchs | Werner Guttmann | Adds configuration of JDO using an inline JDBC DataSource by providing configuration parameters using a Properties collection. | Enh. | JDO | Configuration
1784 |  | Martin Fuchs | Werner Guttmann | Fixed problem using JDOConfFactory with JDBC DataSources. | Bug | JDO | Configuration
1791 |  | Martin Fuchs | Werner Guttmann | Added support for using constants in comparison expressions with bind values. | Enh. | JDO | OQL
1792 |  | Martin Fuchs | Werner Guttmann | Handling of SQL parameter binding and their order is now completely handled by SqlBindParser. | Bug | JDO | OQL
1788 |  | Martin Fuchs | Werner Guttmann | Added support for SQL parameters as part of IN statements in WHERE clauses. | Enh. | JDO | OQL

# Release 0.9.6 RC1

Description: | Mainly bug fixes, but also contains enhancements in Castor JDO, XML.
released: | November 08, 2004
managed by: | Werner Guttmann

## Download & installation instructions

Please note that we are providing the usual suspect (binaries, docs and sources) for this release at the Exolab FTP server. We recommend, though, to download the complete package, as the HTML docs at the main Castor site have not been updated, and build the documentation yourself.

## Changes

### Format of the JDO configuration file

Due to various internal refactorings, we decide to change the syntax of the JDO configuration file, adding a new root element named <jdo-conf> and elements to declare transaction demarcation semantics. Here's a sample of Castor JDO running against mySQL (with local transactions).

    <?xml version="1.0"?>
    <!DOCTYPE jdo-conf PUBLIC
        "-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN"
        "http://castor.org/jdo-conf.dtd">

    <jdo-conf>
        <database name="test" engine="mysql" >
            <driver url="jdbc:mysql://localhost/test"
                    class-name="org.gjt.mm.mysql.Driver">
                <param name="user" value="test" />
                <param name="password" value="test" />
            </driver>
            <mapping href="mapping.xml" />
        </database>
        <transaction-demarcation mode="local" />
    </jdo-conf>

### Configuration of JDBC Datasources

When setting up JDBC DataSources to be used with Castor JDO, configuration of parameters now needs to occur as a sequence of <param> elements rather than one <params> element. This is to stream-line the way these JDBC resources are configured.

What used to be

    <data-source class-name="com.sybase.jdbc2.jdbc.SybDataSource">
        <params user="thomas"
                password="thomas"
                port-number="2048"
                server-name="Dual1"
                database-name="thomas" />
    </data-source>

before this release, now needs to be specifed as follows:

    <data-source class-name="com.sybase.jdbc2.jdbc.SybDataSource">
        <param name="user" value="thomas" />
        <param name="password" value="thomas" />
        <param name="port-number" value="2048" />
        <param name="server-name" value="Dual1" />
        <param name="database-name" value="thomas" />
    </data-source>

Please note the use of hyphens in the naming of properties. In other words, in order for Castor to set the value of the portNumber property of the SybDataSource to '2048', please use the following <param> element

        <param name="port-number" value="2048" />

rather than

        <param name="portNumber" value="2048" />

as shown in the pooling documentation for previous releases.

### Transaction demarcation

A new way of configuring transaction demarcation has been added. This configuration is now part of the main JDO configuration file (jdo-conf) and mandates the specification of the transaction demarcation used within your application.

As part of this configuration file, the user has to specify which transaction demarcation to use. This can either be 'local' or 'global', and is supplied by the use of a <transaction-demarcation> element.

#### Local Mode

When using Castor JDO stand-alone and you want Castor to control transaction demarcation ('local' mode), please use this element as follows:

    <transaction-demarcation mode="local" />

#### Global Mode

When running inside a J2EE application server, and you want to use container managed transactions ('global' transactions), please make sure you use this element as follows:

      <transaction-demarcation mode="global">
        <transaction-manager name="jndi" />
      </transaction-demarcation>

In this mode, the XML element <transaction-manager> specifies the transaction manager that is used by your application server/web container to control these transactions.

The following transaction managers are supported in Castor at the time of the release of Castor 0.9.6:

Name | Description
--- | ---
jndi | TM looked up in the JNDI ENC
websphere | IBM WebSphere 4 and previous releases
websphere5 | IBM WebSphere 5
websphere51 | IBM WebSphere 5.1

In addition to specifying the transaction manager name, it is possible to pass arbitrary name/value pairs to the transaction manager instance.

Note:It should also be noted that "database pooling" must be enabled for the JDO instance when using the WAS v4 and v5 transaction managers, or the JDO "database" instance will fall outside the current transaction/thread, resulting in the error message "No transaction in progress for the current thread". For example:

    JDO myJdo = new JDO();
    myJdo.setDatabasePooling( true );

Note: At the moment, only the JNDI transaction manager factory supports such an attribute. In this context, the jndiEnc attribute can be used to specify what JNDI ENC to use to lookup the transaction manager as shown below:

      <transaction-demarcation mode="global">
        <transaction-manager name="jndi">
          <param name="jndiEnc" value="java:comp/env/TransactionManager" />
        </transaction-manager>
      </transaction-demarcation>

### Using timezone information when accessing date/time/timestamp data

Castor will use the JDBC ResultSet.getDate(int, Calendar) and related methods which take a Calendar object to specify the timezone of the data retrieved from the database when the timezone information is not already specified in the data; this ensures that the 'current' timezone is applied.

The default time zone can be configured in the castor.properties file; see the configuration section for details on how to configure Castor with information about your default time zone. To change the timezone to a different timezone than the default, please set a (different) value on the org.exolab.castor.jdo.defaultTimeZone property:

    # Default time zone to apply to dates/times fetched from database fields,
    # if not already part of the data.  Specify same format as in
    # java.util.TimeZone.getTimeZone, or an empty string to use the computer's
    # local time zone.
    # org.exolab.castor.jdo.defaultTimeZone=
    org.exolab.castor.jdo.defaultTimeZone=GMT+8:00

## New features

### JDO configuration without a file and JDoConfFactory

As part of this release, we have added a way to configure Castor JDO without the need to provide an XML configuration file. As such,

    JDO.setConfiguration(JdoConf)

has been provided to pass in an instance of JdoConf. Too assist users of this new approach in creating JdoConf instances, please have a look at org.exolab.castor.jdo.util.JdoConfFactory.

### Resetting database configurations

In order to clear all previously registered Castor Database configurations you can now call the new function org.exolab.castor.jdo.engine.DatabaseRegistry.clear(). This is for example usefull, if you want to log on using a user supplied login name and database connection. It is especially needed if it's possible to change the login password of the database login account in interactive applications.

### CacheManager

With this release, we have decided to remove several methods related to clearing caches (partially) from Database(impl).java. Instead, we have created a new CacheManager class in the util package that can be obtained from a Database instance as follows:

    Database db = jdo.getDatabase();
    CacheManager manager = db.getCacheManager();

Once such an instance has been obtained, cache content can be cleared (partially) using one of several CacheManager?.clearCache() methods. In addition, users might inquire about whether an object is currently cached (or not) by using CacheManager.isCached (Class, Object).

Details about the functionality provided by this new class can be found in the HTML docs and/or Javadocs.

### OQL - Support for LIMIT/OFFSET clauses

On a selected number of RDBMS, Castor JDO now supports the use of LIMIT (and OFFSET clauses) as follows:

    OQLQuery query =
       db.getOQLQuery ("select a from Account order by id limit $1 offset $2");
    query.bind (10);
    query.bind (5);
    OQLResults results = query.execute();

This will select accounts 6 to 15, given that numbers for account ids start at 1.

As per this release, the following RDBMS have full/partial support for this new feature.

RDBMS | LIMIT | OFFSET
--- | --- | ---
postgreSQL | Yes | Yes
mySQL | Yes | Yes
Oracle - 1) | Yes | Yes
HSQL | Yes | Yes
MS SQL | Yes | -
DB2 | Yes | -

1) Oracle has full support for LIMIT/OFFSET clauses for release 8.1.6 and later.

### OQL - bind variables in combination with "IN" operators

Previously it was only possible to use OQL WHERE statements with "IN" operators of the following form:

    "... WHERE DNAME in list(1, 2, 3)"
    "... WHERE DNAME in list(\"SALES\", \"TEST\", \"ABC\")"
    "... WHERE DNAME in list(\"ABC\", nil)"

To make it easier executing dynamic queries, it's now also allowed to use bind variables, for example:

    "... WHERE DNAME in list($1, $2)"

### Add your own cache implementation

If you are not satisfied with Castor's set of performance caches, we've added a way for you to provide you own cache implementationa and register it with Castor.

To provide a custom cache implementation, you need to

1. Create a class that implements org.exolab.castor.persist.cache.Cache (we have provided an abstract base class that you can use at your convenience).
2. Create a class that implements org.exolab.castor.persist.cache.CacheFactory (we have provided an abstract base class that you can use at your convenience).
3. Register your custom cache implementation with Castor JDO in the castor.properties file.

Detailed instructions can be found in the package.html file of the org.exolab.castor.persist.cache package.

### Castor Source Generator Ant Task

The Castor Source Generator Ant Task has been added to the CVS tree. Below is an example of how to use it from within an Ant build descriptor:

      <target name="castor:gen:src" depends="init"
        description="Generate Java source files from XSD.">

        <taskdef name="castor-srcgen"
          classname="org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask"
          classpathref="castor.class.path" />
        <mkdir dir="${gen.src.d}" />
        <castor-srcgen file="${schema.d}/books2.xsd"
          todir="${gen.src.d}"
          package="com.sourcebeat.castorlive.xmodel"
          types="j2"
          warnings="false" />
      </target>

The only requirement is that the castor-srcgen-ant-task.jar must be on the CLASSPATH.

## New features - experimental

### JDO2 - a new approach

Due to a couple of inconsistencies in the interface of the JDO class, we have decided to refactor this class and provide users with a much improved way of configuring and instantiating JDO instances (as explained below). To provide backwards-compatibility, we have created a new JDO2 class and left the old untouched.

To create a Castor JDO instance (based upon a XML configuration file), users need to execute code similar to the following lines:

    JDO2.loadConfiguration ("jdo-conf.xml");
    JDO2 jdo = JDO2.createInstance ("test");

Similar to what the old interface used to be, a couple of overloaded loadConfiguration() methods are provided, to allow specification of class loaders and XML entity resolvers.

Bug Fixes And Issues Addressed
Id | Date | Fixed by | Committed by | Description | Type | Project | Module
--- | --- | --- | --- | --- | --- | --- | ---

----

20041104

Keith Visco

Keith Visco

Added support for namespace to package mappings on the Unmarshaller and UnmarshalHandler. This basically fixes issues where Castor can't find the right package to look for classes during unmarshalling. This is main for those people using generated source code, as using a mapping file you must specify the packages and namespaces appropriately.

Bug

XML

XML

---- | 20041104 | Keith Visco | Keith Visco | Fixed bug in SourceGenerator where class names for SimpleType instances with Enumeration facets were not getting resolved properly. | Bug | XML | XML
1790 |  | Martin Fuchs | Werner Guttmann | Added additional debug statements during binding of SQL parameters. Reporter: Martin Fuchs | Bug | JDO | OQL
1517 | 20041028 | Werner Guttmann | Werner Guttmann | Added a new isCached() method to CacheManager. | Bug | JDO | Caching
1262 | 20041020 | Jack Warner | Werner Guttmann | Castor JDO now uses timezone information when reading date/timestamp/time data from the RDBMS. | Bug | JDO | Core
1767 | 20041019 | Ralf Joachim | Werner Guttmann | Updated src/tests/jdo/oracle.xml and src/tests/jdo/postgresql.xml to be in-line with new grammar. | Bug | JDO | Core
1764 | 20041018 | Martin Fuchs | Werner Guttmann | Extends new SQL parameter binding code to SimpleQueryExecutor. | Bug | JDO | OQL
1763 | 20041013 | Werner Guttmann | Werner Guttmann | Improved exception handling in the persist.cache package, by ensuring proper exception chaining. | Bug | JDO | Caching
1628 | 20041011 | Werner Guttmann | Werner Guttmann | Brought configuration of <data-source> in line with <driver>, switching from <params> to a sequence of <param> elements. | Bug | JDO | Config
885 | 20041007 | Bruce Snyder | Bruce Snyder | Added the Castor Ant Task and an Ant target to the build jar. | Enh. | JDO | Core
1757 | 20041006 | Werner Guttmann | Werner Guttmann | Added core/** package and children to castor-xml.jar. | Bug | JDO | Core
1755 | 20041006 | Werner Guttmann | Werner Guttmann | Brought jdo-conf.dtd in-line with XML Schema instance, making <transaction-demarcation> required. | Bug | JDO | Config
1685 | 20041005 | Keith Visco | Keith Visco | Fixed StackOverflowError that was occuring at certain times during container processing if the input XML was invalid. Reporter: qiu, hong | Bug | XML | XML
1594 | 20041005 | Werner Guttmann | Werner Guttmann | Added new (experimental) JDO2.java, adding factory method for instantiation, removing public constructor, changing way of loading configuration. | Enh. | JDO | Core
1592 | 20041004 | technicallyrational AT yahoo DOT com | Keith Visco | DecimalValidator was not taking into account a leading sign ('+' or '-'). Reporter: technicallyrational AT yahoo DOT com | Bug | XML | XML
1435 | 20041004 | Matt Caswell | Werner Guttmann | Fixed problem with finding add<FieldName>() method. | Bug | JDO | Core
---- | 20041002 | Werner Guttmann | Werner Guttmann | Framed <driver>, <data-source> and <jndi> elements in jdo-conf.xsd with an <xsd:choice> to indicate that at any time only one should be present. | Enh. | JDO | Config
1752 | 20040928 | Martin Fuchs | Werner Guttmann | Re-enabled support for LIMIT clauses for MS SQL Server. | Bug | JDO | OQL
1548 | 20040927 | Werner Guttmann | Werner Guttmann | Changed Log4J configuration to use XML file (log4j.xml). | Enh. | JDO | Config
1723 | 20040916 | Marco Soeima | Keith Visco | Initial support for xsi:nil. xsi:nil support is not complete with these patches, but it was worth checking them in as it gets us closer to completion. Reporter: Marco Soeima | Enh. | XML | XML
1666 | 20040910 | David Thal | Keith Visco | UnmarshalState._markedList Vector is a performance bottleneck, replaced by a by HashSet. Reporter: David Thal | Enh. | XML | XML
1658 | 20040910 | Chris Giordano | Keith Visco | Fixed Whitepspace handling where whitespace was not preserved for container objects. Reporter: Chris Giordano | Bug | XML | XML
1634 | 20040910 | Keith Visco | Keith Visco | Whilespace was not getting preserved correctly during unmarshalling when parser splits up calls to the UnmarshalHandler#characters method. Reporter: David Green | Bug | XML | XML
---- | 20040910 | Keith Visco | Keith Visco | Updated the Marshaller to use ContentHandler directly instead of wrapping in a ParserAdapter. Users Marshalling to a ContentHandler should see a significant speed up when Marshalling. | Enh. | XML | XML
---- | 20040910 | Keith Visco | Keith Visco | Fixed a bug in the Marshaller with the xsi:type logic not being strict enough. Sometimes the Marshaller was not adding xsi:type when it was needed. I've modified this logic a bit to make it output xsi:type more often in order to preserve round tripping. | Enh. | XML | XML
1727 | 20040909 | Werner Guttmann | Werner Guttmann | Added DB2-specifc support for the OQL LIMIT clause. | Enh. | JDO | OQL
1720 | 20040909 | Werner Guttmann | Werner Guttmann | In the case a RDBMS does not support the LIMIT/OFFSET clauses, a SyntaxNotSupportedException is thrown. | Bug | JDO | OQL
1221 | 20040812 | Lance Lavandowska | Werner Guttmann | Added the ability to specify an OFFSET clause with LIMIT clauses. This patch provides support for postgreSQL, mySQL and HSQL only. | Enh. | JDO | OQL
???? | 20040811 | Werner Guttmann | Werner Guttmann | Added example to src/examples/MappingTool to demonstrate the use of the MappingTool. | Enh. | XML | Mapping tool
1690 | 20040806 | Werner Guttmann | Werner Guttmann | Improved exception handling for the transactionmanager package. | Bug | JDO | Core
1651 | 20040607 | Werner Guttmann | Werner Guttmann | Added XML prefixes to various files in src/examples and src/tests/jdo. |  | JDO | Tests
1402 | 20040607 | Werner Guttmann | Werner Guttmann | Added code to handle extend relationships where no additional fields are added. For such cases, no STORE SQL statement will be generated (and used). | Bug | JDO | Core
1641 | 20040607 | Werner Guttmann | Werner Guttmann | Upgraded JUnit to version 3.8.1. | Enh. | JDO | Core
1534 | 20040513 | Werner Guttmann | Werner Guttmann | Added code to allow users to use their own cache implementation with Castor. In general, available cache implementations are now specified in castor.properties. | Enh. | JDO | Caching
???? | 20040502 | Werner Guttmann | Werner Guttmann | Reworked the mailing list guidelines. Added various sections re: cross-posting, etc. | Enh. | ALL | Core
1588 | 20040406 | Werner Guttmann | Werner Guttmann | Introduces various checks and additional exception handling wrt to using TimeStampables. | Bug | JDO | Core
1585 | 20040330 | Werner Guttmann | Werner Guttmann | Added separate build folders for src/tests and src/examples to the Eclipse project files. | Bug | ALL | Build
1566 | 20040319 | João Luis Pinto | Werner Guttmann | Updated Eclipse related project files. | Bug | All | Build
1221 | 20041001 | Martin Fuchs | Werner Guttmann | Added support for LIMIT/OFFSET clauses for HSQL, and extended HSQL-specific test case. | Enh. | JDO | OQL
1737 | 20041001 | Ralf Joachim | Werner Guttmann | Added support for registering TxSynchronizable instances via castor.properties. | Enh. | JDO | Core
1209 | 20040930 | Ralf Joachim | Werner Guttmann | Added a new converter boolean(true)->numeric(-1) to cover MS Access' way of storing boolean values. | Bug | JDO | Core
1751 | 20040928 | Ralf Joachim | Werner Guttmann | Added Castor JDO test TC20b to mySQL and sapdb categoeries (incl. additions to the SQL DDL). | Enh. | JDO | Tests
1733 | 20040927 | Martin Fuchs | Werner Guttmann | Added support for RDBMS-specific meta data in general. This is currently used within OracleQueryExpression to support the LIMIT clause implementation for Oracle 8.1.6 and above only. | Enh. | JDO | Core
1732 | 20040927 | Martin Fuchs | Werner Guttmann | Added support for LIMIT/OFFSET clauses for Oracle, and fixed problems with mySQL implementation (ordering of parameters). | Bug | JDO | OQL
1689 | 20040923 | Nick Stuart | Werner Guttmann | Added code to support is<FieldName>() methods for boolean properties in addition to standard getter. | Bug | JDO | Core
1655 | 200409017 | Dave Eccleston | Werner Guttmann | Improved debug statements during create operations, showing the actual SQL generated with values bound. | Bug | JDO | Core
1713 | 200409017 | Gregory Block | Werner Guttmann | Fixed problem in FieldMolder when dealing with addXXX() methods on fields of type collection. | Bug | JDO | Core
1689 | 20040917 | Martin Fuchs | Werner Guttmann | FieldMolder now looks for is<FieldName>() methods for boolean properties, in addition to standard get<FieldName>() methods. | Bug | JDO | Core
1704 | 20040917 | Stein M. Hugubakken | Werner Guttmann | Fixed problem with loading classes (resulting in IllegalArgumentException) by properly handling ClassNotFoundExceptions. | Bug | JDO | Core
1511 | 20040917 | Martin Fuchs | Werner Guttmann | Added functionality to clear/reset the database configuration. Added functionality to configure Castor JDO via an in-memory JDOConf instance (plus a factory class for creating JdoConf instances). | Enh. | JDO | Core
1507 | 20040915 | Stein M. Hugubakken | Werner Guttmann | Fixed problem using the HighLowKeyGenerator with the same-connection attribute set to 'true'. | Bug | JDO | Core
1635 | 20040901 | Stein M. Hugubakken | Werner Guttmann | Provided a patch to initialize array(s) with the correct size, rather than hardcoding the value '10'. | Bug | JDO | Core
1518 | 20040902 | Stein M. Hugubakken | Werner Guttmann | Fixed problem with delayed removal of cache entries when deleting objects. | Bug | JDO | Core
1445 | 20040911 | Stein M. Hugubakken | Werner Guttmann | Added clearCache() method to CastorTestCase, and fixed a problem in test data setup in src/tests/jdo/OqlExtends.java | Bug | JDO | Tests
1595 | 20040906 | Stein M. Hugubakken | Werner Guttmann | Added CacheManager (and DatabaseImpl.getCacheManager() method) to allow users to selectively flush the Castor performance cache(s). | Enh. | JDO | Core
1722 | 20040901 | Stein M. Hugubakken | Werner Guttmann | Moved CastorException to org.exolab.castore.core.exceptions. In addition, PersistenceException now derives from CastorException. | Bug | JDO | Core
1696 | 20040817 | Martin Fuchs | Werner Guttmann | Fixed NPE in SQL CALL statements with master/detail relation. | Bug | JDO | Core
1677 | 20040811 | Martin Fuchs | Werner Guttmann | Updated list of available mapping types. | Bug | JDO | Core
1708 | 20040817 | Stein M. Hugubakken | Werner Guttmann | Added (general JDO) Utils class. | Bug | JDO | Core
1445 | 20040607 | Stein M. Hugubakken | Werner Guttmann | Fixed various small problems with SQL DDLs in src/tests/jdo. | Bug | JDO | Tests
1508 | 20040629 | Stein M. Hugubakken | Werner Guttmann | Refactored code, applying strategy pattern. | Bug | JDO | Core
1554 | 20040420 | Stein M. Hugubakken | Werner Guttmann | Fixes a memory leak with the linked-list implementation by removing LinkedList completely; uses the Hashtable directly, resulting in much better performance. ValuesEnumeration no longer use a Vector, but intercepts the initial enumeration to provide the values. | Bug | JDO | Core
1573 | 20040330 | Stein M. Hugubakken | Werner Guttmann | This improves code quality for the complete jdo package (except conf.*) by removing unused import statements and local variables. | Bug | JDO | Core
1714 | 20040817 | Gregory Block | Werner Guttmann | Added log statement to identfy problems with missing collection. | Bug | JDO | Core
1597 | 20040408 | Emir Causevic | Werner Guttmann |  |  |  |
1605 | 20040429 | Emir Causevic | Werner Guttmann | Brought test setup for SAP DB in-line with test requirements. | Bug | JDO | Tests
1605 | 20040429 | Emir Causevic | Werner Guttmann | Brought test config file for SAP DB in-line with XML Schema. | Bug | JDO | Tests
1607 | 20040428 | Emir Causevic | Werner Guttmann | Added test for IdentityKeyGenerator to SAP DB test suite. | Enh. | JDO | Tests
1606 | 20040427 | Emir Causevic | Werner Guttmann | Fixed problem with incorrectly quoting non-function names for SAP DB. | Bug | JDO | Core
1607 | 20040427 | Emir Causevic | Werner Guttmann | Added support for SAB DB to IdentityKeyGenerator. | Bug | JDO | Core
1605 | 20040427 | Emir Causevic | Werner Guttmann | Fixed various problems related to the setup of JDO test data with SAP DB. | Bug | JDO | Tests
1700 | 20040805 | unknown | Werner Guttmann | Fixed problem with 'select count(*) ...' statement with HSQL. | Bug | JDO | Core
1709 | 20040806 | Donnie Armstrong | Werner Guttmann | Added new TransactionManagerFactory for IBM WebSphere 5.1. | Enh. | JDO | Core
1648 | 20040607 | Nick Stuart | Werner Guttmann | Added code to extend the message generated for ObjectModifiedExceptions. | Bug | JDO | Core
1067 | 20040526 |  | Werner Guttmann | Fixed a problem with class loading in various places of ParamInfo by passing a ClassLoader instance during instantiation. | Bug | JDO | Core
---- | 20040516 | Patrick vanKann | Werner Guttmann | Fixed an incorrectly coded equality check related to global transaction demarcation. | Bug | JDO | Core
1368 | 20040428 | Tim O'Brien | Werner Guttmann | Small (mostly syntactical) changes to src/doc/jdo-faq.xml. Added a reference to XPath as well. | Bug | All | Docu
1092 |  | Rhett Sutphin | Werner Guttmann | Fixed default namespace declaration, changed some small syntax issues. | Bug | JDO | Core
1615 | 20040426 | unknown | Werner Guttmann | Fixed a typo in a debug statement (wrong message resource key used). | Bug | JDO | Core
1601 | 20040421 | Tomasz Piontek | Werner Guttmann | Added code to support org.exolab.castor.types.Duration as a native type in Castor JDO. Added convertors for type conversion org.exolab.castor.types.Duration <-> java.lang.Long. | Enh. | JDO | Core
1568 | 20040319 | João Luis Pinto | Werner Guttmann | Streamlines Eclipse related project files. | Bug | All | Eclipse
???? | 20040323 | Werner Guttmann | Bruce Snyder | Added many enhancements to the tx mgr API including code improvements, jdo-conf.xsd changes, dynamic code generation using Castor XML as well as a refactored Ant build descriptor. | Enh. | JDO | Core
1563 | 20040323 | Keith Visco | Bruce Snyder |  | Bug | All | Core
1705 | 20040804 | Bruce Snyder | Bruce Snyder | DuplicateIdentityExceptions not reported correctly when using PostgreSQL. | Bug | JDO | Core

For all releases prior to 0.9.6, the release notes can be found here.

<notice> Copyright © 1999-2005 ExoLab Group, Intalio Inc., and Contributors. All rights reserved. </notice>
<notice> Java, EJB, JDBC, JNDI, JTA, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. XML, XML Schema, XSLT and related standards are trademarks or registered trademarks of MIT, INRIA, Keio or others, and a product of the World Wide Web Consortium. All other product names mentioned herein are trademarks of their respective owners. </notice>