Refactored sender's / listener's connection factory initialization code