@Test public void testSessionTemplateNotFound() throws Exception { try { provider.getSession(new SessionID("FIX.4.3", "S", "T"), null); fail("No exception thrown"); } catch (QFJException e) { } }
public synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector) { Session s = Session.lookupSession(sessionID); if (s == null) { try { SessionID templateID = lookupTemplateID(sessionID); if (templateID == null) { throw new ConfigError("Unable to find a session template for " + sessionID); } SessionSettings dynamicSettings = new SessionSettings(); copySettings(dynamicSettings, settings.getDefaultProperties()); copySettings(dynamicSettings, settings.getSessionProperties(templateID)); dynamicSettings.setString(BEGINSTRING, sessionID.getBeginString()); dynamicSettings.setString(SENDERCOMPID, sessionID.getSenderCompID()); optionallySetValue(dynamicSettings, SENDERSUBID, sessionID.getSenderSubID()); optionallySetValue(dynamicSettings, SENDERLOCID, sessionID.getSenderLocationID()); dynamicSettings.setString(TARGETCOMPID, sessionID.getTargetCompID()); optionallySetValue(dynamicSettings, TARGETSUBID, sessionID.getTargetSubID()); optionallySetValue(dynamicSettings, TARGETLOCID, sessionID.getTargetLocationID()); s = sessionFactory.create(sessionID, dynamicSettings); if (sessionConnector != null) { sessionConnector.addDynamicSession(s); } } catch (ConfigError e) { throw new QFJException(e); } } return s; }
DynamicAcceptorSessionProvider implements AcceptorSessionProvider { public synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector) { Session s = Session.lookupSession(sessionID); if (s == null) { try { SessionID templateID = lookupTemplateID(sessionID); if (templateID == null) { throw new ConfigError("Unable to find a session template for " + sessionID); } SessionSettings dynamicSettings = new SessionSettings(); copySettings(dynamicSettings, settings.getDefaultProperties()); copySettings(dynamicSettings, settings.getSessionProperties(templateID)); dynamicSettings.setString(BEGINSTRING, sessionID.getBeginString()); dynamicSettings.setString(SENDERCOMPID, sessionID.getSenderCompID()); optionallySetValue(dynamicSettings, SENDERSUBID, sessionID.getSenderSubID()); optionallySetValue(dynamicSettings, SENDERLOCID, sessionID.getSenderLocationID()); dynamicSettings.setString(TARGETCOMPID, sessionID.getTargetCompID()); optionallySetValue(dynamicSettings, TARGETSUBID, sessionID.getTargetSubID()); optionallySetValue(dynamicSettings, TARGETLOCID, sessionID.getTargetLocationID()); s = sessionFactory.create(sessionID, dynamicSettings); if (sessionConnector != null) { sessionConnector.addDynamicSession(s); } } catch (ConfigError e) { throw new QFJException(e); } } return s; } }
DynamicAcceptorSessionProvider implements AcceptorSessionProvider { public synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector) { Session s = Session.lookupSession(sessionID); if (s == null) { try { SessionID templateID = lookupTemplateID(sessionID); if (templateID == null) { throw new ConfigError("Unable to find a session template for " + sessionID); } SessionSettings dynamicSettings = new SessionSettings(); copySettings(dynamicSettings, settings.getDefaultProperties()); copySettings(dynamicSettings, settings.getSessionProperties(templateID)); dynamicSettings.setString(BEGINSTRING, sessionID.getBeginString()); dynamicSettings.setString(SENDERCOMPID, sessionID.getSenderCompID()); optionallySetValue(dynamicSettings, SENDERSUBID, sessionID.getSenderSubID()); optionallySetValue(dynamicSettings, SENDERLOCID, sessionID.getSenderLocationID()); dynamicSettings.setString(TARGETCOMPID, sessionID.getTargetCompID()); optionallySetValue(dynamicSettings, TARGETSUBID, sessionID.getTargetSubID()); optionallySetValue(dynamicSettings, TARGETLOCID, sessionID.getTargetLocationID()); s = sessionFactory.create(sessionID, dynamicSettings); if (sessionConnector != null) { sessionConnector.addDynamicSession(s); } } catch (ConfigError e) { throw new QFJException(e); } } return s; } DynamicAcceptorSessionProvider(final SessionSettings settings,
            final SessionID templateID, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory);  DynamicAcceptorSessionProvider(final SessionSettings settings,
            List<TemplateMapping> templateMappings, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory); }
DynamicAcceptorSessionProvider implements AcceptorSessionProvider { public synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector) { Session s = Session.lookupSession(sessionID); if (s == null) { try { SessionID templateID = lookupTemplateID(sessionID); if (templateID == null) { throw new ConfigError("Unable to find a session template for " + sessionID); } SessionSettings dynamicSettings = new SessionSettings(); copySettings(dynamicSettings, settings.getDefaultProperties()); copySettings(dynamicSettings, settings.getSessionProperties(templateID)); dynamicSettings.setString(BEGINSTRING, sessionID.getBeginString()); dynamicSettings.setString(SENDERCOMPID, sessionID.getSenderCompID()); optionallySetValue(dynamicSettings, SENDERSUBID, sessionID.getSenderSubID()); optionallySetValue(dynamicSettings, SENDERLOCID, sessionID.getSenderLocationID()); dynamicSettings.setString(TARGETCOMPID, sessionID.getTargetCompID()); optionallySetValue(dynamicSettings, TARGETSUBID, sessionID.getTargetSubID()); optionallySetValue(dynamicSettings, TARGETLOCID, sessionID.getTargetLocationID()); s = sessionFactory.create(sessionID, dynamicSettings); if (sessionConnector != null) { sessionConnector.addDynamicSession(s); } } catch (ConfigError e) { throw new QFJException(e); } } return s; } DynamicAcceptorSessionProvider(final SessionSettings settings,
            final SessionID templateID, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory);  DynamicAcceptorSessionProvider(final SessionSettings settings,
            List<TemplateMapping> templateMappings, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory); synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector); }
DynamicAcceptorSessionProvider implements AcceptorSessionProvider { public synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector) { Session s = Session.lookupSession(sessionID); if (s == null) { try { SessionID templateID = lookupTemplateID(sessionID); if (templateID == null) { throw new ConfigError("Unable to find a session template for " + sessionID); } SessionSettings dynamicSettings = new SessionSettings(); copySettings(dynamicSettings, settings.getDefaultProperties()); copySettings(dynamicSettings, settings.getSessionProperties(templateID)); dynamicSettings.setString(BEGINSTRING, sessionID.getBeginString()); dynamicSettings.setString(SENDERCOMPID, sessionID.getSenderCompID()); optionallySetValue(dynamicSettings, SENDERSUBID, sessionID.getSenderSubID()); optionallySetValue(dynamicSettings, SENDERLOCID, sessionID.getSenderLocationID()); dynamicSettings.setString(TARGETCOMPID, sessionID.getTargetCompID()); optionallySetValue(dynamicSettings, TARGETSUBID, sessionID.getTargetSubID()); optionallySetValue(dynamicSettings, TARGETLOCID, sessionID.getTargetLocationID()); s = sessionFactory.create(sessionID, dynamicSettings); if (sessionConnector != null) { sessionConnector.addDynamicSession(s); } } catch (ConfigError e) { throw new QFJException(e); } } return s; } DynamicAcceptorSessionProvider(final SessionSettings settings,
            final SessionID templateID, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory);  DynamicAcceptorSessionProvider(final SessionSettings settings,
            List<TemplateMapping> templateMappings, quickfix.Application application,
            MessageStoreFactory messageStoreFactory, LogFactory logFactory,
            MessageFactory messageFactory); synchronized Session getSession(SessionID sessionID, SessionConnector sessionConnector); static final String WILDCARD; }