[ 
https://issues.apache.org/jira/browse/ARIES-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

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 services.

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 annotations.

> EntityManager service factory 
> ------------------------------
>
>                 Key: ARIES-970
>                 URL: https://issues.apache.org/jira/browse/ARIES-970
>             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
(v6.3.4#6332)

Reply via email to