package retro;

import java.sql.*;

public class DBConnexion {
	
	private static DBConnexion instance = null;
	private static Connection connection=null;
	
	private DBConnexion() {
		try {			
		Class.forName("com.mysql.jdbc.Driver"); 
		connection = DriverManager.getConnection("jdbc:mysql://10.70.135.145/retro_tool","root", "root");

		} catch (Exception e) {
			System.out.println(e);
		}		
	}
	
	public static void main(String[] args) {
		DBConnexion obj_DBConnection=new DBConnexion();
		
		System.out.println(obj_DBConnection.getConnection());
	}
	
	
	
	public static Connection getConnection(){
	
		if ( instance == null ) {
			instance = new DBConnexion();
		}
		return connection;
	}
	
}
