how to give database user id and password at runtime not through persistence.xml file
I built a mysql database application in netbeans and while i run the application it takes the database URL(user name and password) from a file called 'persistence.xml', i wished to give the username and password at run time so then i built a login screen which through that it connects to the database fine. Now the point is that still the username and password are taken from that file and how can i change the fixed username and password set in 'persistence.xml' file at run time, i searched a lot but i just found out the following link which it is too complicated and i couldn't understand it.
( f o o b a r . l u ) » Blog Archive » Change JPA EntityManager connection properties at Runtime