A friend of mine has used Hibernate and says it definitely lacks the
EOControl layer. I believe this is the source to the many Hibernate
workarounds I see on the Tapestry lists (such as Open Session in View).
The last time I looked at Hibernate, it didn't have as good of
versioning/optimistic locking (in my opinion) as Cayenne (at least
out-of-the-box). Things could've changed in that regard, but Cayenne's
really works great. There are a number of other things I prefer, too,
but I'm hardly a good source to provide an unbiased comparison.
/dev/mrg
-----Original Message-----
From: Andrus Adamchik [mailto:andru..bjectstyle.org]
Sent: Tuesday, April 04, 2006 10:53 AM
To: cayenne-use..ncubator.apache.org
Subject: Re: accessing cayenne sessions
On Apr 4, 2006, at 5:52 PM, Cyp her wrote:
> * What is the best way of retrieving the session context
> (DataContext) on a given page and tracking the changes over a
> workflow and eventually committing the changes or discarding them?
Cayenne 1.2 has a WebApplicationContextFilter:
http://objectstyle.org/confluence/display/CAYDOC/Servlet+2.3+Filter
It provides you access to the session DataContext regardless of the
framework you use (in the past I put it in Tapestry Visit instead,
but I don't bother anymore, the filter is more portable). If you
configure the filter per docs page above, you can always get the
session context anywhere in the app like this:
DataContext context = DataContext.getThreadDataContext();
> * I have read some people opt to use Tapestry, Spring and
> Hibernate. What are the advantages if there are any and can you use
> Tapestry, Spring and Cayenne?
Yeah, that's the right place to ask for an unbiased Cayenne vs.
Hibernate comparison ;-)
Hibernate is an ORM, so conceptually it is similar to Cayenne (and
EOF). Regarding the differences... Cayenne provides more EOF-like
experience in managing your object graph. I've heard an opinion from
a WO user that Hibernate is more like eoaccess (I guess he was
referring to the fact that you need to manage a number of low-level
details). In this respect Cayenne is eoaccess+eocontrol (and since
recently - also EO JavaClient, for those who care). DataContext is
very similar to EOEditingContext.
IMO when migrating from WO, switching from EOF to Cayenne is a
relatively minor thing compared to switching WO framework to any
other web front-end technology.
Andrus
This archive was generated by hypermail 2.0.0 : Tue Apr 04 2006 - 11:12:03 EDT