You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Giuseppe Gerla (JIRA)" <ji...@apache.org> on 2015/02/06 14:04:34 UTC
[jira] [Commented] (ARIES-1295) container-context - unit map
properties not used to create EntityManager
[ https://issues.apache.org/jira/browse/ARIES-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309091#comment-14309091 ]
Giuseppe Gerla commented on ARIES-1295:
---------------------------------------
A possible solution is to use 2 PersistenceContextProvider services registered. The first is GlobalPersistenceManager, same before, but now with property org.apache.aries.jpa.context.type=context. The second one is PersistenceBundleManager with property org.apache.aries.jpa.context.type=unit. In this way, when the NSHandler processes the Blueprint xml file notify unit name and bundle to "context" service and properties to "unit" service. The "unit" service create a new EntityManagerFactory using these properties.
> container-context - unit map properties not used to create EntityManager
> ------------------------------------------------------------------------
>
> Key: ARIES-1295
> URL: https://issues.apache.org/jira/browse/ARIES-1295
> Project: Aries
> Issue Type: Bug
> Components: JPA
> Affects Versions: jpa-container-context-1.0.4
> Reporter: Giuseppe Gerla
>
> properties that are defined with jpa:map in jpa:unit section are NOT used to create the EnetityManager.
> Properties specified in jpa:map section are passed to JTAEntityManagerHandler to create an EnetityManager "managed" with the call
> manager = emf.createEntityManager (props);
> where emf is an instance of QuiesceEMFHandler. The EntityManagerFactory implementation first create an EntityManager and then add properties passed. So properties are NOT used for the creation.
> I created a test to show that this does not work.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)