users@glassfish.java.net

Re: EntityManagerWrapper.getDelegate() returning EntityManager?

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 20 Dec 2007 18:58:21 +0530

I agree with you. File a bug. EntityManagerWrapper.getDelegate() should
return _getDelegate().getDelegate().

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> Hi,
>
> why does EntityManagerWrapper.getDelegate() return the wrapped EntityManager instead of the wrapped EntityManager's getDelegate()? This means that my code using EntityManager and accessing the underlying delegate (Hibernate Session in my case) has to account for this oddity. Is this really correct?
>
> The javadoc for EntityManager#getDelegate says "Return the underlying provider object for the EntityManager, if available" which I kind of understand as meaning that getDelegate() should give me back Session if I'm using Hibernate, no matter what the EM is wrapped inside. Can someone clarify?
>
> I'm using Glassfish v2-b58g.
>
> Thanks
> [Message sent by forum member 'koser' (koser)]
>
> http://forums.java.net/jive/thread.jspa?messageID=250923
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>