users@glassfish.java.net

Re: Dirty Hack for accessing Hibernate session?

From: Mitesh Meswani <mitesh.meswani_at_oracle.com>
Date: Wed, 09 Mar 2011 11:34:04 -0800

getDelegate() would work, but the preferred mechanism is unwrap
(http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#unwrap(java.lang.Class)
<http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#unwrap%28java.lang.Class%29>).

On 3/9/2011 11:19 AM, Laird Nelson wrote:
> On Wed, Mar 9, 2011 at 7:37 AM, <forums_at_java.net
> <mailto:forums_at_java.net>> wrote:
>
> is it possible to access Hibernate directly, for example the Hibernate
> session from within the EAR? I am fully aware of the fact, that I
> am asking
> for some dirty hack from the JPA Entitymanager perspective...
>
>
> http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#getDelegate%28%29
>
> L