aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Resolved] (ARIES-970) EntityManager service factory
Date Fri, 17 Jul 2015 08:29:04 GMT


Christian Schneider resolved ARIES-970.
       Resolution: Fixed
         Assignee: Christian Schneider
    Fix Version/s: jpa-2.0.0

Aries JPA 2 introduced the concept of an EmSupplier instead of the context bundle. EntityManagers
are created when preCall is called the first time on the thread and closed when postCall is
called on the outermost call.

This allows to support other frameworks than blueprint. Additionally JPATemplate is introduced.
It automates the transaction and EntityManager lifecycle and for example works nicely in declarative

For Aries JPA 2.1.0 the EntityManager lifecycle will be controlled using the OSGi Coordinator
service. So the boundaries can be either declared programmatically or by using @Transactional

> EntityManager service factory 
> ------------------------------
>                 Key: ARIES-970
>                 URL:
>             Project: Aries
>          Issue Type: New Feature
>          Components: JPA
>            Reporter: Tuomas Kiviaho
>            Assignee: Christian Schneider
>             Fix For: jpa-2.0.0
> It is fairly simple to utilize GlobalPersistenceManager via ServiceFactory interface
to register contexts when asked for. Couple of things would make this more robust.
> 1) Introduction/Implementation of PersistenceContextProvider.unregisterContext() which
would require counting of registration calls so that unregistration would not be premature.
> 2) Returning of EntityManagerFactory from PersistenceContextProvider.registerContext
call which omit the roundtrip via bundle context
> I guess that container context project could provide this kind of implementation out
of the box to support other than blueprint environments

This message was sent by Atlassian JIRA

View raw message