The approach I took in the work I’ve done on this over the past few days was that EMF#getProperties exposes al effective properties. This includes a DataSource specified via <jta-data-source/> or <non-jta-data-source/> in persistence.xml If you wish to play with this work, see https://github.com/hibernate/hibernate-orm/pull/3053 |