CXX-188 Extract connection factory as parameter