Hi all following is my database connection file,
package org.slingemp.common;
import java.sql.Connection;
import java.sql.DriverManager;
public class JDBCManager {
public Connection mysqlConnection() {
Connection dbConnection = null;
try {
Class.forName("com.mysql.jdbc.Driver");
dbConnection=DriverManager.getConnection("jdbc:mysql://localhost:3306/slingemp","root","root");
//System.out.println("mysql Driver Connedted::::::::");
} catch (Exception e) {
e.printStackTrace();
}
return dbConnection;
}
}
in this i want to make connection string and driver name configurable. how to do this and where to put the file which contains configurable values?
Regards Tony