if (threadPool == null) threadPool = Executors.newCachedThreadPool();
timeoutTaskInterval = configuration.getTimeoutTaskInterval();
timeoutTask = new TimeoutTask(timeoutTaskInterval);
threadPool.execute(timeoutTask);
DestinationSettings defaultSettings = new DestinationSettings();
defaultSettings.setConsumerSessionTimeoutSeconds(configuration.getConsumerSessionTimeoutSeconds());
defaultSettings.setDuplicatesAllowed(configuration.isDupsOk());
defaultSettings.setDurableSend(configuration.isDefaultDurableSend());
HashMap<String, Object> transportConfig = new HashMap<String, Object>();
transportConfig.put(TransportConstants.SERVER_ID_PROP_NAME, configuration.getInVmId());
ClientSessionFactory consumerSessionFactory = new ClientSessionFactoryImpl(new TransportConfiguration(InVMConnectorFactory.class.getName(), transportConfig));
if (configuration.getConsumerWindowSize() != -1)