Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA vs. Native
JPA vs. Native [message #376336] Fri, 11 July 2008 13:55 Go to next message
Mikhail Kadan is currently offline Mikhail KadanFriend
Messages: 61
Registered: July 2009
Member
Hi.

As I understand, server/client/historical/etc. sessions, advanced
transaction features (using UoW, nested sessions, etc.) are available only
if using EclipseLink native mechanism (creating descriptors with
Workbench, and then using SessionManager). And if I'm using JPA mechanism
(via EntityManager) I'm limited to a session similar to simple
DatabaseSession.

I've discovered document named "Using EclipseLink JPA Extensions" (
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG) ), but it
tells nothing about using this advanced features in JPA. Is it possible to
use advanced EclipseLink sessions in JPA or I have to follow only JPA spec
+ some extensions, described it this document?

Thanks.
Re: JPA vs. Native [message #376340 is a reply to message #376336] Fri, 11 July 2008 18:52 Go to previous message
Doug Clarke is currently offline Doug ClarkeFriend
Messages: 155
Registered: July 2009
Senior Member
Behind the EclipseLink JPA EntityManager implementation is a Client
Session and a UnitOfWork. The EntityManagerFactory wraps a ServerSession.
If you look at the JPAHelper class you will see how you can gain access to
the underlying classic/native API.

http://www.eclipse.org/eclipselink/api/1.0/org/eclipse/persi stence/jpa/JpaHelper.html

You can use the classic API in conjunction with JPA through the use of
this helper class. We have been working to expose many of the advanced
features of EclipseLink through the JPA interface in a more seamless
fashion. Some of these have been completed for 1.0 but some remain as open
issues.

Example: Historical sessions through EclipseLink JPA currently requires
you to access the underlying classic API to create the historical session
or to create queries with As-Of. You will see we have some bugs filed to
address easier JPA usage of these:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=225073

https://bugs.eclipse.org/bugs/show_bug.cgi?id=211328

Doug
Previous Topic:javax.persistence.TransactionRequiredException thrown on EntityManager.flush
Next Topic:Hard coded database plattforms...
Goto Forum:
  


Current Time: Fri Apr 26 21:55:13 GMT 2024

Powered by FUDForum. Page generated in 0.03030 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top