private Initiator createInitiator(Application application, SessionSettings settings,
MessageStoreFactory messageStoreFactory, LogFactory sessionLogFactory,
MessageFactory messageFactory, ThreadModel threadModel) throws ConfigError {
Initiator initiator;
if (threadModel == ThreadModel.ThreadPerSession) {
initiator = new ThreadedSocketInitiator(application, messageStoreFactory, settings, sessionLogFactory, messageFactory);
} else if (threadModel == ThreadModel.ThreadPerConnector) {
initiator = new SocketInitiator(application, messageStoreFactory, settings, sessionLogFactory, messageFactory);
} else {