{
checkInitialised();
HornetQConnectionFactory cf = connectionFactories.get(name);
if (cf == null)
{
ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl(name, ha, jndiBindings);
configuration.setDiscoveryGroupName(discoveryGroupName);
configuration.setFactoryType(cfType);
configuration.setClientID(clientID);
configuration.setClientFailureCheckPeriod(clientFailureCheckPeriod);
configuration.setConnectionTTL(connectionTTL);
configuration.setCallTimeout(callTimeout);
configuration.setCallFailoverTimeout(callFailoverTimeout);
configuration.setCacheLargeMessagesClient(cacheLargeMessagesClient);
configuration.setMinLargeMessageSize(minLargeMessageSize);
configuration.setCompressLargeMessages(compressLargeMessages);
configuration.setConsumerWindowSize(consumerWindowSize);
configuration.setConsumerMaxRate(consumerMaxRate);
configuration.setConfirmationWindowSize(confirmationWindowSize);
configuration.setProducerWindowSize(producerWindowSize);
configuration.setProducerMaxRate(producerMaxRate);
configuration.setBlockOnAcknowledge(blockOnAcknowledge);
configuration.setBlockOnDurableSend(blockOnDurableSend);
configuration.setBlockOnNonDurableSend(blockOnNonDurableSend);
configuration.setAutoGroup(autoGroup);
configuration.setPreAcknowledge(preAcknowledge);
configuration.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
configuration.setTransactionBatchSize(transactionBatchSize);
configuration.setDupsOKBatchSize(dupsOKBatchSize);
configuration.setUseGlobalPools(useGlobalPools);
configuration.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize);
configuration.setThreadPoolMaxSize(threadPoolMaxSize);
configuration.setRetryInterval(retryInterval);
configuration.setRetryIntervalMultiplier(retryIntervalMultiplier);
configuration.setMaxRetryInterval(maxRetryInterval);
configuration.setReconnectAttempts(reconnectAttempts);
configuration.setFailoverOnInitialConnection(failoverOnInitialConnection);
createConnectionFactory(true, configuration, jndiBindings);
}
}