deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ludovic Pénet <l.pe...@senat.fr>
Subject Re: Extended EntityManager
Date Fri, 17 Apr 2015 20:05:39 GMT
Thanks to everybody for your valuable adviced.

I ended with an @ApplicationScoped EntityManagerProducer, producing @ViewAccessScoped ExtendedEntityManager.
ExtendedEntityManager is identical to DS JPA example.

So, something very close from DS JPA page example.

http://deltaspike.apache.org/documentation/jpa.html#_extended_persistence_contexts

In fact, I am still a bit puzzled by DS JPA example, because the EntityManager it produces
is @RequestScoped.

So, when I basically copied/pasted it, the EM was just opened and closed on every request.
And, for an example, session was closed when some hibernate proxies were accessed during serialization...

Do I miss something obvious, or should the doc rather mention that one should use a scope
such as @ViewScoped, @SessionScoped or @ViewAccessScoped rather than @RequestScoped ?

Ludovic


-- 
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
|
| AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
|

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message