public Connection createConnection(String url, String username, String password) throws SQLException {

		if (connection != null && !connection.isClosed())
			return connection;

		connection = DriverManager.getConnection(url, username, password);
		return connection;
	}
public Connection createConnection ( String url , String username , String password ) throws SQLException { if ( connection != null && ! connection . isClosed ( ) ) return connection ; connection = DriverManager . getConnection ( url , username , password ) ; return connection ; }
Constructs a new database connection object and retrieves it.

@return The connection object.
@throws SQLException