I have a persistence.xml file using JDBC, working fine, but the code updates the information in it as users change databases. What’s best practice for reading out the current database from the javax.persistence.jdbc.url property? Parse the file as XML or can I load the information into some persistence unit object by passing the name to it?
Share
You can access a persistence unit as follows: