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
IdDateFixed byCommitted by DescriptionTypeProjectModule
114720050607Werner GuttmannWerner Guttmann Reverted addition to src/tests/jdo/Collections due to problem with missing setItem(ArrayList). BugGeneral
113820050530Werner GuttmannWerner Guttmann Moved key generators to jdo.keygen package. BugGeneral
88120050530Nick StuartRalf Joachim JDOManager can now handle more then one jdo-conf.
Reporter: Nick Stuart
BugJDO
113120050525Werner GuttmannWerner Guttmann Update project documentation. BugGeneral



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 http://castor.codehaus.org/news.html

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
IdDateFixed byCommitted by DescriptionTypeProjectModule
93820050521Andrew FawcettHendrik Schreiber Anonymous groups in complex types are disambiguated unnecessarily
Reporter: Hendrik Schreiber
BugXML
66420050521Andrew FawcettHeri Bender Extra element not ignored in UnmarshalHandler.startElement although it should be ignored.
Reporter: Heri Bender
BugXML
104820050521Andrew FawcettAndrew Fawcett Added support for multi-value attributes
Reporter: Andrew Fawcett
BugXML
113420050520Werner GuttmannWerner Guttmann Restore default behaviour when no type is specified for a field mapping BugJDO
112920050519Stein M. HugubakkenWerner Guttmann Changed column names in SQL statement of CallSql to lower-case. BugJDO
111120050517Werner GuttmannWerner Guttmann Changed documentation from JDO2 to JDOManager. BugJDO
111620050517Werner GuttmannWerner Guttmann Replaced Ant 1.5 with Ant 1.6.x. BugJDO
111220050517Werner GuttmannWerner Guttmann Added documentation about JDBC proxy classes (incl. property in castor.properties). BugJDO
97320050517Emir CausevicWerner Guttmann Changed column name 'num' to 'numb', as 'num' happens to be a keyword with SAPDB. BugJDO
6520050511Jene JasperJene JasperAdded patch to allow CastorSourceGenTask to specify a binding file.enhancementTools
106320050511Ralf JoachimRalf Joachim Refactor CTF-JDO tests into subdirectories (part 1).
Reporter: Ralf Joachim
Ref.JDO
97320050511Werner GuttmannWerner Guttmann build.xml now uses sourc generator Ant task definitio during code generation. EnhJDO
110520050509Andrew FawcettAndrew Fawcett Issues with Namespace Handling in SAX2Any and AnyNode2SAX2
Reporter: Andrew Fawcett
Enh.XML
110420050506Andrew FawcettAndrew Fawcett Added Java 5 "enum" support to Java Source API
Reporter: Andrew Fawcett
EnhancementXML
105020050506Thomas ZoomanAndrew Fawcett Added ability to add exceptions to JConstructor.
Reporter: Thomas Zooman
BugXML
159620050503Keith ViscoKeith Visco Fixes issue with using location attribute with both attributes and text nodes the same location element.
Reporter: George ??
BugXML
95420050503Werner GuttmannWerner Guttmann Added proxy classes for JDBC Connection and PreparedStatement to improve SQL statement logging. BugJDO
109720050502Emir CausevicRalf Joachim Added cast of null needed for some reflection methods for Java5.
Reporter: Emir Causevic
BugJDO
109820050502Emir CausevicRalf Joachim Fixed compile error on Java5 caused by the usage of "enum" as identifier in JDO tests.
Reporter: Emir Causevic
BugJDO
108220050430Werner GuttmannWerner Guttmann Improve the error messages related to the use of key generators. BugJDO
108420050430Werner GuttmannWerner Guttmann Reworked the Cache interface to be 100% compliant with java.util.Map. BugJDO
108820050429Tim TelcikWerner Guttmann Improved the way Castor JDO logs error messages if a transaction fails. BugJDO
88020050427Martin FuchsWerner Guttmann Added java.sql.Connection getJdbcConnection() to Database interface to obtain a handle to the underlying JDBC connection.
Reporter: Martin Fuchs
EnhJDO
108120050425Bruce SnyderBruce 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. BugJDO
108620050425Bin LiuWerner Guttmann Added type casts to Types.java to overcome runtime exceptions with Java 1.4.x.
Reporter: Werner Guttmann
BugJDO
171220050424Gregory BlockRalf Joachim Improved logging of exceptions related to security policy at Configuration.
Reporter: Gregory Block
BugAll
178120050424Martin FuchsRalf Joachim Added JDOManager.loadConfiguration(JdoConf).
Reporter: Martin Fuchs
Enh.JDO
186520050421Ralf JoachimRalf Joachim Multiple <database> problems.
Reporter: Nick Stuart
Enh.JDO
193320050417Ralf JoachimRalf Joachim Refactor AccessMode.
Reporter: Ralf Joachim
Ref.All
173020050408Roy van der KuilKeith Visco Committed: more information on error when manipulating collections
Reporter: Roy van der Kuil
EnhancementXML
192920050408Stefan RotmanRalf Joachim Fixed CastorException prints "Caused by: " to System.err in all cases.
Reporter: Stefan Rotman
BugAll
149120050407Stein M. HugubakkenStein M. Hugubakken Test for open transaction before closing it.
Reporter: Stein M. Hugubakken
BugJDO
186020050406Ralf JoachimRalf Joachim Rename JDO2 to JDOManager.
Reporter: Ralf Joachim
Ref.JDO
182020050406Werner GuttmannRalf Joachim Add template for submitting a bug report.
Reporter: Werner Guttmann
EnhAll
121420050402Werner GuttmannRalf Joachim Fixed problem in field molder when dealing with 'set' methods with more than one signature.
Reporter: Howard Pelling
BugJDO
190320050324Stein M. HugubakkenStein M. Hugubakken Surrounded logging-statements with isDebugEnabled() if the logging-string is assembled.
Reporter: Stein M. Hugubakken
BugAll
191620050330Tim TelcikRalf 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
BugJDO
191720050330Tim TelcikRalf Joachim Fixed misleading error messages referencing to "javax.jta.TransactionManager" instead of "javax.transaction.TransactionManager".
Reporter: Tim Telcik
BugJDO
169120050320Martin FuchsMartin 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. BugJDO
188920050318Ralf JoachimRalf Joachim Fixed bug with cryptic message at 1:m relation with depends relationship.
Reporter: Hugo Ferreira
BugJDO
188220050312Ralf JoachimRalf Joachim Fixed failure in hash code calculation of org.exolab.castor.persist.spi.Complex.
Reporter: Ralf Joachim
BugJDO
185120050307Werner GuttmannWerner GuttmannAdded RSS news feedEnhAll
185220050307Nick StuartWerner GuttmannFixed Compile issue on JDK 1.5.0_01.BugJDO
189620050305Martin FuchsMartin Fuchs Elimination of unnecessary compiler warnings. Enh.Misc
187720050217Werner GuttmannWerner Guttmann Fixed wrong class and method name for Websphere 5.0 transaction manager factory. BugJDO



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
IdDateFixed byCommitted by DescriptionTypeProjectModule
187320050303Gregory BlockGregory 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. BugJDOCore
185520050208Ralf JoachimWerner Guttmann Fixed problem with TransactionContext.getObjectEntry(Object) that was introduced as a result of adding support for lazy loading 1:1 relations. BugJDOCore
184920050204Ralf JoachimWerner Guttmann Added F.A.Q. entry describing compatibility problems between various releases of mySQL 4.1.x and its JDBC drivers. FAQJDODocs
184820050204Werner GuttmannWerner GuttmannReverted various DOCTYPE definitions in src/tests/jdo to use DTDs.JDOTests
---- 20050118Keith ViscoKeith 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.XMLMapping
185020050114Keith ViscoKeith 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
BugXMLXML
---- 20050110Keith ViscoKeith Visco Fixed recent issue where ElementDecl#getType() method was always returning null for element references. BugXMLXML



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
IdDateFixed byCommitted by DescriptionTypeProjectModule
1839Stein M. HugubakkenWerner GuttmannAdded getCacheManager() method in Database interfaceEnh.JDOCaching
1798Keith ViscoFixed problem with loading mappings with relative pathBugJDOTests
137220041217Keith ViscoKeith 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. BugAllCore
1824Keith ViscoWerner GuttmannFixed various problems that prevented compilation under JDK 1.3.BugJDOCore
1827Stein M. HugubakkenWerner GuttmannFixed syntax error in src/tests/jdo/mysql.sql.BugJDOTests
1815Patrick vanKannWerner GuttmannImproved exception handling during TransactionContext instantiation.BugJDOJDO
1725Jeff BonevichWerner GuttmannChanged attribute type for 'name' attribute on key-generator element definition in mapping.dtd.BugJDOCore
1768Ralf JoachimWerner GuttmannOverloaded jdo.Size with Oracle-specific test case.BugJDOTests
181220041214Gregory BlockWerner GuttmannVarious problems with classloader usage.BugJDOCore
179320041213Martin FuchsWerner GuttmannSimleQueryExecutor and data visibility issuesBugJDOJDO
172320041210Keith ViscoKeith Visco Added some additional support for nillable fields. There is still some more work needed in this area, but this gets us closer. Enh.XMLXML
---- 20041210Keith ViscoKeith 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.XMLXML



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
IdDateFixed byCommitted by DescriptionTypeProjectModule
156020041214Keith ViscoKeith ViscoFixed NullPointerException thrown during Castor ValidationBugXMLXML
1676Werner GuttmannWerner GuttmannAdded support for lazy-loading simple 1:1 relationsEnh.JDOJDO
1777Patrick vanKannWerner GuttmannStatus property of Castor's TransactionContext not set correctly in global transactions.BugJDOJDO
1804Martin FuchsWerner GuttmannCastor JDO test suite now uses log level "error" by default.Enh.JDOJDO
1795Gregory BlockWerner GuttmannFixed problem in CastorException? (String, Throwable) where the constructor of the superclass was not called.BugJDOCore
1797Ralf JoachimWerner GuttmannFixed problem with resetting the capacity of CountLimited? cache.BugJDOJDO
1774Werner GuttmannFixed problem with "sqltime" field type where it was incorrectly mapped to java.sql.Date rather than java.sql.Time.BugJDOJDO
1790Martin FuchsWerner GuttmannAdded additional debug statements during binding of SQL parameters.Enh.JDOJDO
1785Martin FuchsWerner GuttmannAdds configuration of JDO using an inline JDBC DataSource by providing configuration parameters using a Properties collection.Enh.JDOConfiguration
1784Martin FuchsWerner GuttmannFixed problem using JDOConfFactory with JDBC DataSources.BugJDOConfiguration
1791Martin FuchsWerner GuttmannAdded support for using constants in comparison expressions with bind values.Enh.JDOOQL
1792Martin FuchsWerner GuttmannHandling of SQL parameter binding and their order is now completely handled by SqlBindParser.BugJDOOQL
1788Martin FuchsWerner GuttmannAdded support for SQL parameters as part of IN statements in WHERE clauses.Enh.JDOOQL



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:

NameDescription
jndiTM looked up in the JNDI ENC
websphereIBM WebSphere 4 and previous releases
websphere5IBM WebSphere 5
websphere51IBM 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.

RDBMSLIMITOFFSET
postgreSQLYesYes
mySQLYesYes
Oracle - 1)YesYes
HSQLYesYes
MS SQLYes-
DB2Yes-

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
IdDateFixed byCommitted by DescriptionTypeProjectModule
---- 20041104Keith ViscoKeith 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. BugXMLXML
---- 20041104Keith ViscoKeith Visco Fixed bug in SourceGenerator where class names for SimpleType instances with Enumeration facets were not getting resolved properly. BugXMLXML
1790Martin FuchsWerner GuttmannAdded additional debug statements during binding of SQL parameters.
Reporter: Martin Fuchs
BugJDOOQL
151720041028Werner GuttmannWerner GuttmannAdded a new isCached() method to CacheManager.BugJDOCaching
126220041020Jack WarnerWerner Guttmann Castor JDO now uses timezone information when reading date/timestamp/time data from the RDBMS. BugJDOCore
176720041019Ralf JoachimWerner Guttmann Updated src/tests/jdo/oracle.xml and src/tests/jdo/postgresql.xml to be in-line with new grammar. BugJDOCore
176420041018Martin FuchsWerner GuttmannExtends new SQL parameter binding code to SimpleQueryExecutor.BugJDOOQL
176320041013Werner GuttmannWerner Guttmann Improved exception handling in the persist.cache package, by ensuring proper exception chaining. BugJDOCaching
162820041011Werner GuttmannWerner Guttmann Brought configuration of <data-source> in line with <driver>, switching from <params> to a sequence of <param> elements. BugJDOConfig
88520041007Bruce SnyderBruce Snyder Added the Castor Ant Task and an Ant target to the build jar. Enh.JDOCore
175720041006Werner GuttmannWerner Guttmann Added core/** package and children to castor-xml.jar. BugJDOCore
175520041006Werner GuttmannWerner Guttmann Brought jdo-conf.dtd in-line with XML Schema instance, making <transaction-demarcation> required. BugJDOConfig
168520041005Keith ViscoKeith Visco Fixed StackOverflowError that was occuring at certain times during container processing if the input XML was invalid.
Reporter: qiu, hong
BugXMLXML
159420041005Werner GuttmannWerner Guttmann Added new (experimental) JDO2.java, adding factory method for instantiation, removing public constructor, changing way of loading configuration. Enh.JDOCore
159220041004technicallyrational AT yahoo DOT comKeith Visco DecimalValidator was not taking into account a leading sign ('+' or '-').
Reporter: technicallyrational AT yahoo DOT com
BugXMLXML
143520041004Matt CaswellWerner Guttmann Fixed problem with finding add<FieldName>() method. BugJDOCore
---- 20041002Werner GuttmannWerner 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.JDOConfig
175220040928Martin FuchsWerner Guttmann Re-enabled support for LIMIT clauses for MS SQL Server. BugJDOOQL
154820040927Werner GuttmannWerner Guttmann Changed Log4J configuration to use XML file (log4j.xml). Enh.JDOConfig
172320040916Marco SoeimaKeith 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.XMLXML
166620040910David ThalKeith Visco UnmarshalState._markedList Vector is a performance bottleneck, replaced by a by HashSet.
Reporter: David Thal
Enh.XMLXML
165820040910Chris GiordanoKeith Visco Fixed Whitepspace handling where whitespace was not preserved for container objects.
Reporter: Chris Giordano
BugXMLXML
163420040910Keith ViscoKeith Visco Whilespace was not getting preserved correctly during unmarshalling when parser splits up calls to the UnmarshalHandler#characters method.
Reporter: David Green
BugXMLXML
---- 20040910Keith ViscoKeith 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.XMLXML
---- 20040910Keith ViscoKeith 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.XMLXML
172720040909Werner GuttmannWerner Guttmann Added DB2-specifc support for the OQL LIMIT clause. Enh.JDOOQL
172020040909Werner GuttmannWerner Guttmann In the case a RDBMS does not support the LIMIT/OFFSET clauses, a SyntaxNotSupportedException is thrown. BugJDOOQL
122120040812Lance LavandowskaWerner Guttmann Added the ability to specify an OFFSET clause with LIMIT clauses. This patch provides support for postgreSQL, mySQL and HSQL only. Enh.JDOOQL
????20040811Werner GuttmannWerner Guttmann Added example to src/examples/MappingTool to demonstrate the use of the MappingTool. Enh.XMLMapping tool
169020040806Werner GuttmannWerner Guttmann Improved exception handling for the transactionmanager package. BugJDOCore
165120040607Werner GuttmannWerner Guttmann Added XML prefixes to various files in src/examples and src/tests/jdo. JDOTests
140220040607Werner GuttmannWerner 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). BugJDOCore
164120040607Werner GuttmannWerner Guttmann Upgraded JUnit to version 3.8.1. Enh.JDOCore
153420040513Werner GuttmannWerner 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.JDOCaching
????20040502Werner GuttmannWerner Guttmann Reworked the mailing list guidelines. Added various sections re: cross-posting, etc. Enh.ALLCore
158820040406Werner GuttmannWerner Guttmann Introduces various checks and additional exception handling wrt to using TimeStampables. BugJDOCore
158520040330Werner GuttmannWerner Guttmann Added separate build folders for src/tests and src/examples to the Eclipse project files. BugALLBuild
156620040319João Luis PintoWerner Guttmann Updated Eclipse related project files. BugAllBuild
122120041001Martin FuchsWerner Guttmann Added support for LIMIT/OFFSET clauses for HSQL, and extended HSQL-specific test case. Enh.JDOOQL
173720041001Ralf JoachimWerner Guttmann Added support for registering TxSynchronizable instances via castor.properties. Enh.JDOCore
120920040930Ralf JoachimWerner Guttmann Added a new converter boolean(true)->numeric(-1) to cover MS Access' way of storing boolean values. BugJDOCore
175120040928Ralf JoachimWerner Guttmann Added Castor JDO test TC20b to mySQL and sapdb categoeries (incl. additions to the SQL DDL). Enh.JDOTests
173320040927Martin FuchsWerner 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.JDOCore
173220040927Martin FuchsWerner Guttmann Added support for LIMIT/OFFSET clauses for Oracle, and fixed problems with mySQL implementation (ordering of parameters). BugJDOOQL
168920040923Nick StuartWerner Guttmann Added code to support is<FieldName>() methods for boolean properties in addition to standard getter. BugJDOCore
1655200409017Dave EcclestonWerner Guttmann Improved debug statements during create operations, showing the actual SQL generated with values bound. BugJDOCore
1713200409017Gregory BlockWerner Guttmann Fixed problem in FieldMolder when dealing with addXXX() methods on fields of type collection. BugJDOCore
168920040917Martin FuchsWerner Guttmann FieldMolder now looks for is<FieldName>() methods for boolean properties, in addition to standard get<FieldName>() methods. BugJDOCore
170420040917Stein M. HugubakkenWerner Guttmann Fixed problem with loading classes (resulting in IllegalArgumentException) by properly handling ClassNotFoundExceptions. BugJDOCore
151120040917Martin FuchsWerner 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.JDOCore
150720040915Stein M. HugubakkenWerner Guttmann Fixed problem using the HighLowKeyGenerator with the same-connection attribute set to 'true'. BugJDOCore
163520040901Stein M. HugubakkenWerner Guttmann Provided a patch to initialize array(s) with the correct size, rather than hardcoding the value '10'. BugJDOCore
151820040902Stein M. HugubakkenWerner Guttmann Fixed problem with delayed removal of cache entries when deleting objects. BugJDOCore
144520040911Stein M. HugubakkenWerner Guttmann Added clearCache() method to CastorTestCase, and fixed a problem in test data setup in src/tests/jdo/OqlExtends.java BugJDOTests
159520040906Stein M. HugubakkenWerner Guttmann Added CacheManager (and DatabaseImpl.getCacheManager() method) to allow users to selectively flush the Castor performance cache(s). Enh.JDOCore
172220040901Stein M. HugubakkenWerner Guttmann Moved CastorException to org.exolab.castore.core.exceptions. In addition, PersistenceException now derives from CastorException. BugJDOCore
169620040817Martin FuchsWerner Guttmann Fixed NPE in SQL CALL statements with master/detail relation. BugJDOCore
167720040811Martin FuchsWerner Guttmann Updated list of available mapping types. BugJDOCore
170820040817Stein M. HugubakkenWerner Guttmann Added (general JDO) Utils class. BugJDOCore
144520040607Stein M. HugubakkenWerner Guttmann Fixed various small problems with SQL DDLs in src/tests/jdo. BugJDOTests
150820040629Stein M. HugubakkenWerner Guttmann Refactored code, applying strategy pattern. BugJDOCore
155420040420Stein M. HugubakkenWerner 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. BugJDOCore
157320040330Stein M. HugubakkenWerner Guttmann This improves code quality for the complete jdo package (except conf.*) by removing unused import statements and local variables. BugJDOCore
171420040817Gregory BlockWerner Guttmann Added log statement to identfy problems with missing collection. BugJDOCore
159720040408Emir CausevicWerner Guttmann
160520040429Emir CausevicWerner Guttmann Brought test setup for SAP DB in-line with test requirements. BugJDOTests
160520040429Emir CausevicWerner Guttmann Brought test config file for SAP DB in-line with XML Schema. BugJDOTests
160720040428Emir CausevicWerner Guttmann Added test for IdentityKeyGenerator to SAP DB test suite. Enh.JDOTests
160620040427Emir CausevicWerner Guttmann Fixed problem with incorrectly quoting non-function names for SAP DB. BugJDOCore
160720040427Emir CausevicWerner Guttmann Added support for SAB DB to IdentityKeyGenerator. BugJDOCore
160520040427Emir CausevicWerner Guttmann Fixed various problems related to the setup of JDO test data with SAP DB. BugJDOTests
170020040805unknownWerner Guttmann Fixed problem with 'select count(*) ...' statement with HSQL. BugJDOCore
170920040806Donnie ArmstrongWerner Guttmann Added new TransactionManagerFactory for IBM WebSphere 5.1. Enh.JDOCore
164820040607Nick StuartWerner Guttmann Added code to extend the message generated for ObjectModifiedExceptions. BugJDOCore
106720040526Werner Guttmann Fixed a problem with class loading in various places of ParamInfo by passing a ClassLoader instance during instantiation. BugJDOCore
---- 20040516Patrick vanKannWerner Guttmann Fixed an incorrectly coded equality check related to global transaction demarcation. BugJDOCore
136820040428Tim O'BrienWerner Guttmann Small (mostly syntactical) changes to src/doc/jdo-faq.xml. Added a reference to XPath as well. BugAllDocu
1092Rhett SutphinWerner Guttmann Fixed default namespace declaration, changed some small syntax issues. BugJDOCore
161520040426unknownWerner Guttmann Fixed a typo in a debug statement (wrong message resource key used). BugJDOCore
160120040421Tomasz PiontekWerner 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.JDOCore
156820040319João Luis PintoWerner Guttmann Streamlines Eclipse related project files. BugAllEclipse
????20040323Werner GuttmannBruce 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.JDOCore
156320040323Keith ViscoBruce Snyder BugAllCore
170520040804Bruce SnyderBruce Snyder DuplicateIdentityExceptions not reported correctly when using PostgreSQL. BugJDOCore

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

 
   
  
   
 


Copyright © 1999-2005 ExoLab Group, Intalio Inc., and Contributors. All rights reserved.
 
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.