Unable to dynamically set JPA datasource when creating entity manager factory in JBoss EAP
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7
- Hibernate 5
Issue
- Passing
javax.persistence.jtaDataSourcein the property map supplied to Content from javaee.github.io is not included.Persistence.createEntityManagerFactory(String, Map). - The value for the property is ignored and the default datasource (or one defined in the
persistence.xmlusingjta-data-sourceornon-jta-data-source) is used instead.
Resolution
This issue1 is resolved in This content is not included.EAP 7.2 cumulative patch (CP) 7 and later releases.
Root Cause
This is a known defect (Content from hibernate.atlassian.net is not included.HHH-12858).
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.