As suggested by Reza, a continuation of
There's a couple of things that were being discussed there, but configurability of the annotation was the prime concern.Â
Mark Struberg additionally remarked several aspects where underspecified.
It was mentioned that Payara and JBoss/WildFly already support placeholders inside theÂ@DataSourceDefinition annotation and XML variant. Liberty doesn't support that yet, but appeared to be interested.
Together with a concept of "stage", to select between known in-archive config sets, the ability to provide an external config set, additionally password-aliasing, and finally the ability to replace a data source fully via server mechanisms (admin console, etc) it's possible to setup a quite comprehensive and workable system.
However, none of that is standardised yet.
Specifically the fact thatÂ@DataSourceDefinition does not distinguish between properties intended for the pool and and properties intended for the data source itself, can be troublesome.
Maybe it would be an idea if @DataSourceDefinition (or a modern replacement thereof) moved to the JPA spec, to that a more consistent trio of connection pool, data source and persistence unit can be easily defined.