I am using persistence.xml where is my db connection. And in log4j.xml I have given persistenceUnitName="JPAloggingPersistenceUnit"
which is in persistence.xml so it will take database connection from persistence.xml but which is hardcoded.
So I wanted make my persistence.xml dynamic which take connection from properties file.
I want to make persistence.xml dynamic which reads file from property file; like using ${username}
as key in persistence which take from properties file.
In log4j2.xml I have mentioned <JPA name="db-log" persistenceUnitName="JPAloggingPersistenceUnit" entityClassName="com.majesco.digitalio.logentity.JpaLogEntity" />
.
In persistence.xml I have mentioned below like
<persistence-unit name="JPAloggingPersistenceUnit" transaction-type="RESOURCE_LOCAL">
.