integration overrides during JPA bootstrap ought to override all logically related settings

Description

Given this peristence.xml:

This should work to overwrite the jta-data-source.

But instead, it crashes in JSE and unit tests because it tries to resolve "java:jboss/datasources/ExampleDS" from JNDI. The `javax.persistence.jdbc.url` should overwrite the jta-data-source entry.

Even adding this doesn't fix it:

In Eclipse Link it's apparently possible to overwrite the persistence.xml's <jta-data-source> element: https://stackoverflow.com/a/20819336/472109

In Hibernate, that approach doesn't work: https://stackoverflow.com/questions/51514433/jpa-reuse-persistence-xml-with-jta-data-source-in-jse-and-junit-by-overriding-t

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Geoffrey De Smet

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure