cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Help with Jersey Rest Services and Cayenne
Date Thu, 02 Jun 2011 11:57:35 GMT

On Jun 2, 2011, at 2:43 PM, Andrus Adamchik wrote:

> XML (or other types of serialization) of framework-managed objects is a pretty involved
topic. So my advise would be to use your own POJO data transfer objects (DTO) to work with
JAXB (those can be auto generated from the model with custom templates if you want). 

And I wish at some point we'd create JAXB bindings for Cayenne. Just that nobody volunteered
to do that yet. We took a few shots at various XML serialization implementations. The most
notable are:

1. http://cayenne.apache.org/doc30/api/org/apache/cayenne/xml/package-summary.html

Working, but has severe performance limitations. Deprecated in 3.1 and will be removed from
Cayenne in the future.

2. http://svn.apache.org/repos/asf/cayenne/sandbox/cayenne-serialization/

A proof of concept that I wrote for metadata-driven XStream-based serializer (can work with
JSON or XML). I like this one. It provides fine-grained control over which parts of the object
graph are serialized and is generally more flexible than 1. However it still requires significant
work to make it production-quality.

3. Finally the JAXB integration was an idea that was floated around, but hasn't materialized
yet.

Any interested parties are welcomed to jump on the dev list and discuss this further (and
offer help!).

Cheers,
Andrus
Mime
View raw message