Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Equivalent of unwrap in JPA 1.0

You can use getDelegate() in JPA 1.0, cast to JpaEntityManager and call
getSession().

((JpaEntityManager)em.getDelegate()).getSession()


Sri Sankaran wrote:
> 
> I need to deploy my Eclipselink-based application to a container that
> includes JPA 1.0 (WebLogic 10.0)
> 
> However I would like to be able to use the
> StoredFunctionCall<http://wiki.eclipse.org/Using_Basic_Query_API_%28ELUG%29>
> class.  However I don't know how to get a reference to the underlying
> session.  Using
> entityManager.unwrap()<http://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html>
> is not an option since the unwrap() method is not available in JPA 1.0.
> 
> Sri
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/Equivalent-of-unwrap-in-JPA-1.0-tp32857270p32874071.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top