I obtain a Connection object to my Database thru
JDBC, where the connection properties come from an external prop file.
I also have to call another
java program within my code, passing in the connection details (like dbname, username, password etc.).
I figured out that i can get the user name, dbname, etc from the connection's meta data. But, what I can't manage is to find a way to extract the password detail from the Connection object.
My Questions are:
1. Am I doing the right thing in trying to extract the password details from the Connection object?
2.Is there some other way I can get the password info, in my code (other than accessing the props file)?
Can somebody help me out?