Unable to dynamically set JPA datasource when creating entity manager factory in JBoss EAP

Solution Verified - Updated -

Issue

  • Passing javax.persistence.jtaDataSource in the property map supplied to Persistence.createEntityManagerFactory(String, Map).
  • The value for the property is ignored and the default datasource (or one defined in the persistence.xml using jta-data-source or non-jta-data-source) is used instead.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Hibernate 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content