persistence@glassfish.java.net

Re: TopLink: Data retrieval after EM closed, bug?

From: Dan Allen (mojavelinux) <"Dan>
Date: Tue, 25 Nov 2008 09:53:43 -0800 (PST)

According to the spec (or at least the intent of the spec), once the
EntityManager is closed, it should not be retrieving data from the database,
which is exactly why TopLink's behavior is wrong. This feature was left in
the TopLink implementation to help novice developers sidestep the
LazyInitializationException that Hibernate throws. The consequence is that
it completely breaks the guarantees that the persistence context affords
you.

-Dan


Antonio Sánchez-3 wrote:
>
> Thank you Tom.
>
> I issued this at
>
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=5782
>
> before I had been able to read your comment.
>
> Wouldn't it enhace TopLink having the chance of configuring this
> behavior? In my case I have to re-think and possibly redesign my
> application framework in order to bear this in mind.
>

-- 
View this message in context: http://www.nabble.com/TopLink%3A-Data-retrieval-after-EM-closed%2C-bug--tp19236087p20686410.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.