![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ![]() | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]()
|
Release notesReleases ReleasesFor all releases prior to 0.9.6, the release notes can be found here. Release SVN
Release 1.1.2.1
ChangesThis release is a minor release only and essentially fixes a regression issue of 1.1.2 that basically prevents specific user groups from using 1.1.2. Please see below issue list for details.
Release 1.1.2
AdditionsAdded support for (un-)marshalling Java 5 enumsCastor XML now supports Java 5 enums in all cases where either a mapping file is used or it is relied upon default introspection. ChangesBinary JARs restructuredAs part of this release, we have again moved several areas of functionality to separate deployment units, resulting into additional JARs available for download:
Please note that the Castor JAR does not include this component anymore. In other words, if you want to use Castor JDO as a persistence framework, you will have to download both the Castor XML and Castor JDO JARs, as Castor JDO internally uses Castor XML. For details, please have a look at the download instructions.
Release 1.1.1
AdditionsAdded support for substitution groupsSupport for substitution groups has been added. This new feature is marked as experimental simply to indicate that we'd appreciate as much feedback and testing as possible. Added 'automatic class name conflict resolution' modeThe XML code generator now support a new 'automatic class name conflict resolution' mode that will minimize - if not completely prevent - class name conflicts during code generation. To enable this mode, please set the following property in your custom castorbuilder.properties file as shown below:
This new mode will avoid class name conflicts by prepending XPATH fragments or type suffices to the 'normal' class name as generated otherwise. Validation of <xs:sequence> orderAdded support for validation of correct order of elements of <xsd:sequence> typed complex types during unmarshaling. A ValidationException will be thrown if the expected order cannot be matched. Added support for <xs:hexBinary>Added support for the XML schema type <xs:hexBinary> during XML code generation. Added new <contentMember> element to binding filesupport for the hexBinary data typeThis new element (child of a <componentBinding>) allows to specify a custom member name for the content member as generated for a mixed mode complex type definition. Added support for the hexBinary data typeThe XML (Un-)Marshaller now supports the data type hexBinary. Improved interface of XMLClassDescriptorResolverThe public interface of XMLClassDescriptorResolver has been improved and stream-lined, adding various new methods for pre-loading class descriptors. Please check here for details. Added Unmarshaller.setObject(Object)To specify an existing root object to be used during unmarshalling, setObject(Object) has been added, alternatively to the Unmarshaller(Object) constructor.
Release 1.1
AdditionsExtended XMLClassDescriptorResolverAdded new functionality to XMLClassDescriptorResolver to pre-load class descriptors for a package. Please find details about this new feature at the best practises for Castor XML.
Release 1.1-M3
ChangesXML serialization with JDK 5.0As Sun has included Apache's Xerces with Java 5.0 by default, we have added support for using the Xerces instance as shipped with the JRE/JDK for serialization. As such, for Java 5.0 users, this removes the requirement to download Xerces separately. To enable this new feature, please change the following property in your local castor.properties file (thus redefining the default value) as shown below:
Castor under JDK 6As of this release, Castor now builds under JDK 6.0. Castor XML has been tested under JDK 6.0. However, Castor JDO has not really been tested under JDK 6.0. Note that you may need to use a JDBC 4.0 compatible connector with this new JDK. CodegenIf you are using the Castor code generator to generate code from schemas that use xsd:import, whether or not code was generated from the imported schemas was controlled by a combination of switches. Now it is controlled only by the "-generateImportedSchemas" option of SourceGeneratorMain, the Ant task option of the same name, or if you are calling codegen programmatically, the method sgen.setGenerateImportedSchemas(true);. XML CTFThe XML CTF has been moved to its own area. It has been moved from ./src/tests/ into ./xmlctf/. All scripts to run the CTF have been updated for this change.
Release 1.1-M2
AdditionsDDL GeneratorAt the Google Summer of Code program for 2006, the student Le Duc Bao worked for Castor. With support of his mentor Ralf Joachim, he implemented a generator for DDL scripts from scratch. Castor DDL Generator creates a SQL script to drop/create tables, unique keys, sequences and so on, from a Castor JDO mapping file.
This will generate the SQL script mapping.sql in the same directory mapping.xml is located. The code generator now supports multiple pattern facets properly.ChangesBinary JARs restructuredAs part of this release, we have started to move several areas of functionality to separate deployment units, resulting into additional JARs available for download:
In addition, as outlined above, the new DDL generator has been made available as a separate deployment unit as well, resulting into ...
Please note that the Castor XML (and JDO) JARs do not include these components anymore. In other words, if you want to use both Castor XML (for (un-)marshaling) and the XML code generator for code generation from an XML schema, you will have to download both JARs. For details, please have a look at the download instructions. Code generation for <xs:int> and <xs:integer>As part of the work for fixing bug 1760, it has been recognized that the approach taken as part of working on issue 1741 was slightly too ambitious. As such, the XML code generator has been changed (again) to generate the following Java types for elements/attributes typed with <xs:int> and <xs:integer>:
Release 1.1-M1
ChangesCode generation for <xs:int> and <xs:integer>As part of the work for fixing bug 1421, it has been recognized that the code generated pre-patch did not comply with the set of rules defined in the XML schema specification. As such, the XML code generator has been changed to generate the following Java types for elements/attributes typed with <xs:int> and <xs:integer>:
The only difference between the artifacts generated is that a different Java type is used with a different (and appropriate to the specification) value range. Thus, the value range that will be accepted by the generated Java instance variables has changed. XML test suite executionThe CTF currently requires the Sun JDK (or SDK) to execute, although it may be possible to execute with GNU gcj or with JRockit. The CTF will not work if you are using only a JRE. This is because the CTF uses the Sun Java compiler API to compile code as needed for Source Generator and Marshaling Framework tests. The CTF code is written to allow easy extension for additional compiler frameworks, so if you use a compiler or runtime that is not supported, you should be able to easily add support for a new framework. If you want to do this, contact Castor committors for assistance and direction and they'll set you on the right course. Two new features have been added to the CTF that allow users to add Java-version-specific tests. The first new feature applies to an entire test, that is, the full suite of tests described by a single TestDescriptor.xml file. If you add the following tag to a TestDescriptor.xml: <MinimumJavaVersion>1.5</MinimumJavaVersion> then the entire suite of tests described by that test descriptor will be skipped if the version of Java executing the test suite is not at least the minimum version specified. For the second new feature, if you add the following tag to an individual Unit Test in a TestDescriptor.xml: <JavaSourceVersion>1.2</JavaSourceVersion> then for that individual unit test, all code will be compiled with the javac parameter -source 1.2, using the version specified. For both of these parameters, you are expected to supply a value that is allowed by the javac -source command-line option, although if you specify an integer between 5 and 9 (inclusive), that value will automatically be converted to the correct value. In the source generator, all facets are now implemented for all of the XML Schema date/time types with one exception: validation for the "fixed" facet of xsd:dateTime is not implemented. This is because Castor marshals dateTime as a java.util.Date, which does not contain time zone information. A later release of Castor may marshal xsd:dateTime into a java.util.Calendar instead of java.util.Date. An additional unit test type has been added to the MarshallingTest and SourceGeneratorTest test types that allows invoking user-supplied arbitrary code that will either return a boolean "false" or an Exception if the user-test fails or it will throw an exception if the user-test fails. For a sample of this new unit test type, see the tests in the directory MasterTestSuite/sourcegenerator/Facets/DateTimeNoTimeZone/ The Source Generator now creates class descriptors in a subdirectoryPreviously, the class descriptors (used during marshaling and unmarshaling to provide constraints, validation assistance, etc.) were generated into the same directory (same package) as the classes they describe. Starting with this release, the class descriptors are generated into a subpackage named "descriptors" one directory lower than the package where the classes being described are generated. Doing so prevents the class descriptors from cluttering up the directory where the code the developer cares about will be generated. An additional benefit of this change occurs if you generate source into a directory that already contains other source code. In this instance, it can be difficult for ANT to determine whether or not you need to regenerate the generated source code, that is, whether the XSD file is newer or older than the generated source. Under the usual circumstance where the descriptors subpackage contains only generated code, you can use the ANT <uptodate> task to compare the timestamp of the XSD file against the timestamps of the descriptors, and thus reliably know whether or not you have to regenerate source code. For marshaling and unmarshaling, the class descriptors will be located via the ".castor.cdr" files located in the directories (packages) where the classes are generated. If these files are deleted or are not kept (we highly recommend including these files in your JAR file) then the class descriptor resolver will first look for the class descriptors in the same package where the classes to be described are. If they are not found there, then the class descriptor resolver will look in a subpackage "descriptors." This maintains backwards compatibility with code generated under older Castor releases. AdditionsCode generation -- Specifying member visibility in binding fileIt is now -- at the <member> level -- possible to specify a Java member's visibility (different from the default value "private") similar to ...
Valid values for the visibility attribute are protected, private and public, as per the definition in binding.xsd.
Support for additional collection types in binding fileAdded support for specifying additional collection types in a binding file, similar to ...
The following types have been added: 'collection', 'set' and 'sortedset'. Extended support for validation of IDs during unmarshalingThe default IDResolverImpl class has been changed so that a validation exception will be thrown if an empty or duplicate ID value is encountered. Added support for <enumBinding>sThe XML code generator has been enhanced so that it is possible to provide a binding for the following enumeration ...
as follows:
Add support for validating <xsd:ID> during marshaling.Castor XML now supports validation of <xsd:ID>s during marshaling, preventing the following scenarios from being marshaled successfully (throwing a ValidationException instead):
Release 1.0.5
ChangesXML code generation - Signature type for 'j2' collectionsThe Castor code generator now uses 'java.util.List' as type when generating code for a Java member (as well as the type used for the corresponding getter and setter methods) rather than the old 'java.util.ArrayList'.
Release 1.0.4
RequirementsBackported Castor to be compliant with Java 1.3 again. Therefore the dependecy on Java 1.4 introduced with 1.0 release has been removed.To not lose features like JDBC 3.0 introduced with the 1.0 release of Castor, we decided to use reflection or dynamic proxies in some places. This allows one to use these features with Java 1.4 while still being able to use Castor with Java 1.3. AdditionsDatabase appender for log4j through CastorJDOWe have added a database appender for log4j through CastorJDO to our
codebase in the
To use the appender within your application you need to create tables
to hold the log information at your database. An example script to create
these tables as well as examples of mapping.xml and jdo-config.xml can
also be found in Before you use the logger for the first time you need to initialize CastorJDO.
Thereafter you can use your logger as usual. Log4j will use CastorAppender to write the log information to the database.
One additional thing you need to take care of: As CastorAppender does some caching to reduce database operations, you have to tell it to write all cached information to database before you close your application.
We also provided a way to extend the information logged to database. For an example extension take a look at LogReferenceExtension and TestCastorAppender classes as well as the example mapping file. Special getter methods for XML mappingAs part of a field mapping, it is now possible to specify two special methods that will be treated in a non-standard way. If the 'get-method' specified on a field mapping starts with either 'enum' or 'iterate', it will be treated in a way that the collection (container) is only exposed through this 'enumeration'/'iteration' method. Added new property org.exolab.castor.sax.features-to-disableTo disabled selected features on the XML parser used internally by Castor XML, please use the new property org.exolab.castor.sax.features-to-disable as shown below # Comma separated list of SAX 2 features that should be disabled # for the default parser. #org.exolab.castor.sax.features-to-disable Added new CTF test case type to test source generation only, especially useful for regression tests of exceptions thrown during source generationFor a sample and for the place to add future test cases for the Master Test Suite, see the directory tree src/tetsts/xml/MasterTestSuite/sourcegenerator/generationOnly, although regression tests should be added to the regression suite
Release 1.0.3
AdditionsSupport for ProgressSupport for Progress has been added. For initial information about configuration of Castor JDO for the use with Progress, please see src/tests/jdo/progress.xml. New unmarshal() methods for UnmarshallerIn addition to the already existing methods, two new unmarshal() methods have been added to Unmarshaller, namely ...
Fixed problems - Overview
Release 1.0.2
ChangesSource generator now supports Java 5.0The Castor source generator now supports the generation of Java 5.0
compliant classes. The generated code - with the new feature
enabled - will make use of the following Java 5.0-specific
artefacts:
To enable this feature (off by default), please uncomment the following property in your custom castorbuilder.properties file:
New property in castor.propertiesAdded new property to castor.properties to disable use of package-based '.castor.xml' files during class resolution selectively, which is enabled by default. To disable this feature, please uncomment the following property in your custom castor.properties file:
Internal handling of idenitiesIn the past Castor differentiated between single and multiple field identities of persistent objects. For single field identities Castor hold the identitiy object itself while the objects of a multiple field identity where wrapped by an instance of Complex class. This caused various if-then-else constructs to differentiat the 2 representations of identities. With the refactoring identities are now always wrapped by an instance of Identity class being it a single or a multiple fields one. This resulted in much cleaner code at various areas and in addition we could improve type checking by declaring lots of properties and parameters to be of Identity class instead of simply Object. While we could manage to be backward compatible for all methods that
gets an identity passed (e.g. You have to be aware that you need to adapt your code to get things
working as before if you use Creation of MappingLoadersAs of release 1.0.2 the MappingLoader implementations need to be configured in castor.properties file. While this also allows to specify external MappingLoader implementations to be used by Castor, it now is also required to specify the 2 internal implementations in this file. # # MappingLoader implementations # org.castor.mapping.Loaders=\ org.exolab.castor.jdo.engine.JDOMappingLoader,\ org.exolab.castor.xml.XMLMappingLoader You have to be aware that you need add the new configuration property to you custom castor.properties file.
Release 1.0.1
Development environmentOn April 14. 2006 we have migrated Castor source repository from CVS to SVN. At the moment we still provide read only access to CVS but this does not reflect commits to SVN after the migration. The read only access to CVS is intended for you to create patches of your current work and move it over to SVN. Be aware that we will switch off CVS soon. For details about SVN access please have a look at: SVN/JIRA. AdditionsAdded support for ehCacheBy specifing
at class mapping you can now use ehCache with Castor JDO. As of ehcache 1.2, ehcache can be used as a distributed cache. Added support for GigaspacesBy specifing
at class mapping you can now use Gigaspaces with Castor JDO, supporting all possible use scenarios of Gigaspaces (local cache, remote cache, local master cache, distributed cache, partitions) in a flexible way. ChangesANSI-SQL-92 compliance for MS SQLServerRefactored the SQLServer-specific classes to support ANSI-SQL-92 compliant syntax in addition to the existing code base.
Release 1.0
RequirementsIntroduced Java 1.4 as a dependecyThis is a reminder that we have started to add some features that more or less depend on features made available with Java 1.4 (only), such as the JDBC 3.0 API enhancements. As such, we have made Java 1.4 a key requirement for the upcoming Castor 1.0 release.
For all the releases prior to 1.0, the release notes can be found at here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() ![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |