[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124722#comment-16124722
 ] 

ASF subversion and git services commented on DELTASPIKE-1281:
-------------------------------------------------------------

Commit 7594ba6e36ccdf2bd0ea0e32926745b42c0eba63 in deltaspike's branch 
refs/heads/master from [~johndament]
[ https://git-wip-us.apache.org/repos/asf?p=deltaspike.git;h=7594ba6 ]

DELTASPIKE-1281 - Add JPA Expected attribute for BeanManager.


> Deltaspike does not pass BeanManager to persistenf factory config using 
> "javax.persistence.bean.manager"
> --------------------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1281
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1281
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: JPA-Module
>    Affects Versions: 1.8.0
>         Environment: Deltaspike 1.8, Weld 3.0, Java 8 (JSE) JPA with 
> HIbernate 5.2.10
>            Reporter: Alex Roytman
>            Assignee: John D. Ament
>             Fix For: 1.8.1
>
>
> As the result no injections were working in JPA listeners.
> Per specs Persistence UnitFactory expects BeanManager in 
> javax.persistence.bean.manager property passed when instantiate it but 
> org.apache.deltaspike.jpa.impl.entitymanager.PersistenceConfigurationProviderImpl
>  does not pass it
> this simple override took care of it but I should not need to do it:
> {code:java}
> @ApplicationScoped
> @Alternative
> @Priority(Interceptor.Priority.APPLICATION + 10)
> public class CdiAwarePersistenceConfigurationProviderImpl extends 
> PersistenceConfigurationProviderImpl implements 
> PersistenceConfigurationProvider {
>   @Inject BeanManager beanManager;
>   @Override public Properties getEntityManagerFactoryConfiguration(String 
> persistenceUnitName) {
>     final Properties conf = 
> super.getEntityManagerFactoryConfiguration(persistenceUnitName);
>     conf.put("javax.persistence.bean.manager", beanManager);
>     return conf;
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to