minor refactoring
minor refactor _getConnection: without HttpPrincipal