[jboss-jira] [JBoss JIRA] (WFLY-9132) Applications won't deploy if their persistence.xml have multiple persistence units

Bobby Bassman (JIRA) issues at jboss.org
Thu Jul 27 15:27:00 EDT 2017


    [ https://issues.jboss.org/browse/WFLY-9132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13441351#comment-13441351 ] 

Bobby Bassman commented on WFLY-9132:
-------------------------------------

Thanks Scott, adding
<property name="wildfly.jpa.default-unit" value="true" />
to persistence.xml fixed this problem.


> Applications won't deploy if their persistence.xml have multiple persistence units
> ----------------------------------------------------------------------------------
>
>                 Key: WFLY-9132
>                 URL: https://issues.jboss.org/browse/WFLY-9132
>             Project: WildFly
>          Issue Type: Bug
>          Components: JPA / Hibernate
>    Affects Versions: 10.1.0.Final
>         Environment: Windows 10 64 bit
> Wildfly 10.1.0
>            Reporter: Bobby Bassman
>            Assignee: Scott Marlow
>
> Applications won't deploy if their persistence.xml have multiple persistence units. This was not a problem with EAP. Now, Wildfly requires that each @PersistenceContext have a 'unitName' parameter. WIth EAP 6.4, if a @PersistenceContext did not have a 'unitName' parameter, then the default PU was used. By requiring that @PersistenceUnit have 'unitName', developers are forced to unnecessarily bind Java code to configuration.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list