Template method pattern
getConnection