Results 1 to 1 of 1
- 03-31-2012, 07:27 AM #1Member
- Join Date
- Mar 2012
- Rep Power
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
Last edited by zabltn; 03-31-2012 at 07:29 AM.
- By trupesh1991 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 01-17-2012, 12:54 PM
- By exose in forum New To JavaReplies: 6Last Post: 01-20-2011, 03:59 PM
- By cool in forum AWT / SwingReplies: 2Last Post: 11-03-2010, 07:42 AM
- By firstname.lastname@example.org in forum Java ServletReplies: 2Last Post: 11-14-2008, 02:11 PM
- By prfalco in forum New To JavaReplies: 4Last Post: 02-18-2008, 08:03 AM