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
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?
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.
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
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: