clearIO();
try
{
ConnectionFactoryConfiguration configuration = new ConnectionFactoryConfigurationImpl(name, ha, bindings);
if (useDiscovery)
{
configuration.setDiscoveryGroupName(connectorNames[0]);
}
else
{
ArrayList<String> connectorNamesList = new ArrayList<String>();
for (String nameC : connectorNames)
{
connectorNamesList.add(nameC);
}
configuration.setConnectorNames(connectorNamesList);
}
configuration.setFactoryType(JMSFactoryType.valueOf(cfType));
configuration.setClientID(clientID);
configuration.setClientFailureCheckPeriod(clientFailureCheckPeriod);
configuration.setConnectionTTL(connectionTTL);
configuration.setCallTimeout(callTimeout);
configuration.setCallFailoverTimeout(callFailoverTimeout);
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);
if (loadBalancingPolicyClassName == null || loadBalancingPolicyClassName.trim().equals(""))
{
loadBalancingPolicyClassName = HornetQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME;
}
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);
configuration.setGroupID(groupId);
server.createConnectionFactory(true, configuration, bindings);
sendNotification(NotificationType.CONNECTION_FACTORY_CREATED, name);
}