JPA 2.0 (Eclipse Link version
We don't know which database to connect. In run-time, the connection factory (information) for the database we want to connect will be provided.
Sample information is as follows:
<persistence-unit name="PersistenceContextName" transaction-type="RESOURCE_LOCAL">
<property name="eclipselink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="eclipselink.jdbc.url" value="jdbc:mysql://localhost:3306/dial_db"/>
<property name="eclipselink.jdbc.user" value="root"/>
<property name="eclipselink.jdbc.password" value="mysql"/>
What we want to do is to update connection properties dynamically (on-the-fly) without terminating Connection Factory.
How can we accomplish it? Any suggestions?
Thank you in advance,