Change the class `ConnectionFactory`