protected Connection makeSourceConnection() throws SQLException {

        Connection conn;
        String driverClass = getDriverClass();

        try {
            Class.forName(driverClass);
        } catch (ClassNotFoundException cnfe) {
            throw new RuntimeException("Could not load db driver class: " + driverClass);
        }

        String username = options.getSourceUser();
        String password = options.getSourcePassword();
        String connectString = options.getSourceConnect();

        Properties connectionParams = options.getSourceConnectionParams();
        if (connectionParams != null && connectionParams.size() > 0) {
            LOG.trace("User specified connection params. Using properties specific API for making connection.");

            Properties props = new Properties();
            if (username != null) {
                props.put("user", username);
            }

            if (password != null) {
                props.put("password", password);
            }

            props.putAll(connectionParams);
            conn = DriverManager.getConnection(connectString, props);
        } else {
            LOG.trace("No connection parameters specified. Using regular API for making connection.");
            if (username == null) {
                conn = DriverManager.getConnection(connectString);
            } else {
                conn = DriverManager.getConnection(connectString, username, password);
            }
        }

        conn.setAutoCommit(false);

        return conn;
    }
Create a connection to the database; usually used only from within
getConnection(), which enforces a singleton guarantee around the
Connection object.
src/main/java/org/replicadb/manager/SqlManager.java