public Connexion(String serveur, String bd, String pass, String user)
  throws SQLException
{
Driver d;
try {
	if (serveur.equals("local")) {
		d = (Driver) Class.forName("oracle.jdbc.driver.OracleDriver")
				.newInstance();
		DriverManager.registerDriver(d);
		conn = DriverManager.getConnection(
				"jdbc:oracle:thin:@127.0.0.1:1521:" + bd, user, pass);
	}
	if (serveur.equals("sti")) {
		d = (Driver) Class.forName("oracle.jdbc.driver.OracleDriver")
				.newInstance();
		DriverManager.registerDriver(d);
		conn = DriverManager.getConnection(
				"jdbc:oracle:thin:@io.usherbrooke.ca:1521:" + bd, user,
				pass);
	} else if (serveur.equals("postgres")) {
		d = (Driver) Class.forName("org.postgresql.Driver")
				.newInstance();
		DriverManager.registerDriver(d);
		conn = DriverManager.getConnection("jdbc:postgresql:" + bd,
				user, pass);
	}

    // mettre en mode de commit manuel
    conn.setAutoCommit(false);
    
    // mettre en mode seialisable si possible
    // (plus haut niveau d'integrite l'acces concurrent aux donnees)
    DatabaseMetaData dbmd = conn.getMetaData();
    if (dbmd.supportsTransactionIsolationLevel(Connection.TRANSACTION_SERIALIZABLE))
        {
        conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
        System.out.println(
          "Ouverture de la connexion en mode serialisable :\n" +
          "Estampille " + System.currentTimeMillis() + " " + conn);
        }
    else
        System.out.println(
          "Ouverture de la connexion en mode read committed (default) :\n" +
          "Heure " + System.currentTimeMillis() + " " + conn);
    }// try
    
catch (SQLException e) {throw e;}
catch (Exception e)
    {
    e.printStackTrace(System.out);
    throw new SQLException("JDBC Driver non instancie");
    }
}