Persistence Strategies [Was: Open source WO - offer]
Andrus Adamchik <[email protected]> Tue, 5 Sep 2006 20:51:07 +0400
| Newsgroups | gmane.comp.web.webobjects.general |
|---|---|
| Message-ID | <[email protected]> |
> I asked some people at work with more experience with Hibernate
> than I have why the practice in Hibernate is to
> open and close a session with each request,
Not sure if it ties to the transaction and resource management
mechanism (in Cayenne and EOF the context is not holding any
resources, so it doesn't have to be released explicitly). Other than
that, it may be all about caching. In Cayenne some users create a new
DataContext on each request - totally up to the user how they do it.
I think what happens in reality is that users of a particular
framework go with the default setting, and only investigate other
choices if it doesn't fit a particular scenario.
> BTW, what's the timeline for JPA support in Cayenne?
Good question. We already have annotations and XML mapping processor
in place and about ~60% of the class enhancer. We still have no
support for the spec Query Language. And also there is a number of
things that we need to do to make it spec compliant.
I won't give a specific date - it is all based on volunteer work
after all. But I'll use this opportunity to ask for help from anyone
on this list who wants to participate in this effort :-)
Andrus
On Sep 4, 2006, at 5:33 PM, Bruce Fancher wrote:
> Yeah, the whole detached object thing seems to be one of the
> dumbest things
> about Hibernate. I understand the principle("POJOs dude!"), but in
> practice
> it seems to cause nothing but trouble (see "Open Session in View") and
> doesn't really buy you very much. I asked some people at work with
> more
> experience with Hibernate than I have why the practice in Hibernate
> is to
> open and close a session with each request, whereas with EOF you
> just leave
> one or more EditingContexts open. No one seemed to know. Any ideas?
> What's the recommended practice with Cayenne?
>
> BTW, what's the timeline for JPA support in Cayenne? Not that I
> think that
> JPA is such a great spec, but it's hard to sell Cayenne on a
> project to
> people who want "standards" and think that Hibernate is it. I'm
> hoping that
> if nothing else, JPA will open the door a little bit to considering
> better
> alternatives.
>
> Thanks,
>
> Bruce