Title: Guide to 1.2 Features

This page describes new features and other changes introduced in 1.2 release.

Core Framework

Remote Object Persistence

Cayenne Remote Object Persistence is a low-overhead web services-based technology that provides lightweight generic object persistence and data query functionality to 'remote' applications. It allows to use the same object model and the same context capabilities in a system with more than one Java tier. Now persistence features can be implemented consistently across a set of collaborating applications with different responsibilities and security context.

ObjectContext API

ObjectContext is a new interface that is a generalization of the traditional DataContext. In fact DataContext is one of its main implementors. Another implementation is CayenneContext used on remote clients.

Query Enhancements

Generated Columns

Cayenne now supports auto-increment/identity columns as an alternative mechanism for primary key generation.

DTD Changes

...

JDK 1.5 Features Support

Generic Persistent Class

Cayenne allows CayenneDataObject (or its subclass) to be used as a generic persistent object, skipping class generation and compilation steps. Use only when appropriate!

WebApplicationContextFilter

A Servlet Specification 2.3 compatible way to bind DataContext to the request thread. See chapter 12.2.4 of the new User Guide shipped with 1.2 milestones for details.

DBCPDataSourceFactory: DBCP Pool Support

A connection pool from jakarta-commons DBCP project is now supported via the modeler - just select DBCPDataSourceFactory from the DataSource factories dropdown. The new factory loads its configuration from a specified properties file (see DBCPDataSourcefactory Javadocs for supported properties). DBCP connection pool is much more advanced than the one provided by Cayenne and supports a dozen or so runtime parameters. See Javadocs for org.objectsyle.cayenne.conf.DBCPDataSourceFactory for details.

Database Adapter Improvements/New Adapters

DataContext Improvements

XML Serialization

A new package org.objectstyle.cayenne.xml provides a way to encode arbitrary Java objects to XML and decode them from XML. It allows a great degree of control over the XML structure, thus simplifying integration with third party XML message systems. M5 features the first usable release of this feature. However there may be more changes in the course of 1.2.

Need to document this better, for now see Javadocs for org.objectstyle.cayenne.xml.XMLEncoder and org.objectstyle.cayenne.xml.XMLDecoder.

Loading JNDI DataNodes from Local Preferences

If a DataNode is configured to use JNDIDataSourceFactory, you can setup a "Local DataSource" via Modeler preferences with the name matching the JNDI name. After that when you run your application locally without a JNDI container, Cayenne would use local preferences database.

WebObjects Integration

EOModel importer now correctly imports EOFetchSpecification qualifiers, prefetches and a number of other previously ignored parameters.

Tools: CayenneModeler, Ant Tools

General UI Rework

CayenneModeler is significantly more user friendly compared to 1.1.

Ant Task Improvements

Code Generation Improvements