{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORIES);
for (String jmsConnectionFactoryKey : jmsConnectionFactories.keySet())
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY);
PersistedConnectionFactory jmsConnectionFactory = jmsConnectionFactories.get(jmsConnectionFactoryKey);
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_NAME);
xmlWriter.writeCharacters(jmsConnectionFactory.getName());
xmlWriter.writeEndElement();
String clientID = jmsConnectionFactory.getConfig().getClientID();
if (clientID != null)
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CLIENT_ID);
xmlWriter.writeCharacters(clientID);
xmlWriter.writeEndElement();
}
long callFailoverTimeout = jmsConnectionFactory.getConfig().getCallFailoverTimeout();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CALL_FAILOVER_TIMEOUT);
xmlWriter.writeCharacters(Long.toString(callFailoverTimeout));
xmlWriter.writeEndElement();
long callTimeout = jmsConnectionFactory.getConfig().getCallTimeout();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CALL_TIMEOUT);
xmlWriter.writeCharacters(Long.toString(callTimeout));
xmlWriter.writeEndElement();
long clientFailureCheckPeriod = jmsConnectionFactory.getConfig().getClientFailureCheckPeriod();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CLIENT_FAILURE_CHECK_PERIOD);
xmlWriter.writeCharacters(Long.toString(clientFailureCheckPeriod));
xmlWriter.writeEndElement();
int confirmationWindowSize = jmsConnectionFactory.getConfig().getConfirmationWindowSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONFIRMATION_WINDOW_SIZE);
xmlWriter.writeCharacters(Integer.toString(confirmationWindowSize));
xmlWriter.writeEndElement();
long connectionTTL = jmsConnectionFactory.getConfig().getConnectionTTL();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONNECTION_TTL);
xmlWriter.writeCharacters(Long.toString(connectionTTL));
xmlWriter.writeEndElement();
long consumerMaxRate = jmsConnectionFactory.getConfig().getConsumerMaxRate();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONSUMER_MAX_RATE);
xmlWriter.writeCharacters(Long.toString(consumerMaxRate));
xmlWriter.writeEndElement();
long consumerWindowSize = jmsConnectionFactory.getConfig().getConsumerWindowSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONSUMER_WINDOW_SIZE);
xmlWriter.writeCharacters(Long.toString(consumerWindowSize));
xmlWriter.writeEndElement();
String discoveryGroupName = jmsConnectionFactory.getConfig().getDiscoveryGroupName();
if (discoveryGroupName != null)
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_DISCOVERY_GROUP_NAME);
xmlWriter.writeCharacters(discoveryGroupName);
xmlWriter.writeEndElement();
}
int dupsOKBatchSize = jmsConnectionFactory.getConfig().getDupsOKBatchSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_DUPS_OK_BATCH_SIZE);
xmlWriter.writeCharacters(Integer.toString(dupsOKBatchSize));
xmlWriter.writeEndElement();
JMSFactoryType factoryType = jmsConnectionFactory.getConfig().getFactoryType();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_TYPE);
xmlWriter.writeCharacters(Integer.toString(factoryType.intValue()));
xmlWriter.writeEndElement();
String groupID = jmsConnectionFactory.getConfig().getGroupID();
if (groupID != null)
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_GROUP_ID);
xmlWriter.writeCharacters(groupID);
xmlWriter.writeEndElement();
}
String loadBalancingPolicyClassName = jmsConnectionFactory.getConfig().getLoadBalancingPolicyClassName();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_LOAD_BALANCING_POLICY_CLASS_NAME);
xmlWriter.writeCharacters(loadBalancingPolicyClassName);
xmlWriter.writeEndElement();
long maxRetryInterval = jmsConnectionFactory.getConfig().getMaxRetryInterval();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_MAX_RETRY_INTERVAL);
xmlWriter.writeCharacters(Long.toString(maxRetryInterval));
xmlWriter.writeEndElement();
long minLargeMessageSize = jmsConnectionFactory.getConfig().getMinLargeMessageSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_MIN_LARGE_MESSAGE_SIZE);
xmlWriter.writeCharacters(Long.toString(minLargeMessageSize));
xmlWriter.writeEndElement();
long producerMaxRate = jmsConnectionFactory.getConfig().getProducerMaxRate();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_PRODUCER_MAX_RATE);
xmlWriter.writeCharacters(Long.toString(producerMaxRate));
xmlWriter.writeEndElement();
long producerWindowSize = jmsConnectionFactory.getConfig().getProducerWindowSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_PRODUCER_WINDOW_SIZE);
xmlWriter.writeCharacters(Long.toString(producerWindowSize));
xmlWriter.writeEndElement();
long reconnectAttempts = jmsConnectionFactory.getConfig().getReconnectAttempts();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_RECONNECT_ATTEMPTS);
xmlWriter.writeCharacters(Long.toString(reconnectAttempts));
xmlWriter.writeEndElement();
long retryInterval = jmsConnectionFactory.getConfig().getRetryInterval();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_RETRY_INTERVAL);
xmlWriter.writeCharacters(Long.toString(retryInterval));
xmlWriter.writeEndElement();
double retryIntervalMultiplier = jmsConnectionFactory.getConfig().getRetryIntervalMultiplier();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_RETRY_INTERVAL_MULTIPLIER);
xmlWriter.writeCharacters(Double.toString(retryIntervalMultiplier));
xmlWriter.writeEndElement();
long scheduledThreadPoolMaxSize = jmsConnectionFactory.getConfig().getScheduledThreadPoolMaxSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_SCHEDULED_THREAD_POOL_MAX_SIZE);
xmlWriter.writeCharacters(Long.toString(scheduledThreadPoolMaxSize));
xmlWriter.writeEndElement();
long threadPoolMaxSize = jmsConnectionFactory.getConfig().getThreadPoolMaxSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_THREAD_POOL_MAX_SIZE);
xmlWriter.writeCharacters(Long.toString(threadPoolMaxSize));
xmlWriter.writeEndElement();
long transactionBatchSize = jmsConnectionFactory.getConfig().getTransactionBatchSize();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_TRANSACTION_BATCH_SIZE);
xmlWriter.writeCharacters(Long.toString(transactionBatchSize));
xmlWriter.writeEndElement();
boolean autoGroup = jmsConnectionFactory.getConfig().isAutoGroup();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_AUTO_GROUP);
xmlWriter.writeCharacters(Boolean.toString(autoGroup));
xmlWriter.writeEndElement();
boolean blockOnAcknowledge = jmsConnectionFactory.getConfig().isBlockOnAcknowledge();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_ACKNOWLEDGE);
xmlWriter.writeCharacters(Boolean.toString(blockOnAcknowledge));
xmlWriter.writeEndElement();
boolean blockOnDurableSend = jmsConnectionFactory.getConfig().isBlockOnDurableSend();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_DURABLE_SEND);
xmlWriter.writeCharacters(Boolean.toString(blockOnDurableSend));
xmlWriter.writeEndElement();
boolean blockOnNonDurableSend = jmsConnectionFactory.getConfig().isBlockOnNonDurableSend();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_BLOCK_ON_NON_DURABLE_SEND);
xmlWriter.writeCharacters(Boolean.toString(blockOnNonDurableSend));
xmlWriter.writeEndElement();
boolean cacheLargeMessagesClient = jmsConnectionFactory.getConfig().isCacheLargeMessagesClient();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CACHE_LARGE_MESSAGES_CLIENT);
xmlWriter.writeCharacters(Boolean.toString(cacheLargeMessagesClient));
xmlWriter.writeEndElement();
boolean compressLargeMessages = jmsConnectionFactory.getConfig().isCompressLargeMessages();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_COMPRESS_LARGE_MESSAGES);
xmlWriter.writeCharacters(Boolean.toString(compressLargeMessages));
xmlWriter.writeEndElement();
boolean failoverOnInitialConnection = jmsConnectionFactory.getConfig().isFailoverOnInitialConnection();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_FAILOVER_ON_INITIAL_CONNECTION);
xmlWriter.writeCharacters(Boolean.toString(failoverOnInitialConnection));
xmlWriter.writeEndElement();
boolean ha = jmsConnectionFactory.getConfig().isHA();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_HA);
xmlWriter.writeCharacters(Boolean.toString(ha));
xmlWriter.writeEndElement();
boolean preAcknowledge = jmsConnectionFactory.getConfig().isPreAcknowledge();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_PREACKNOWLEDGE);
xmlWriter.writeCharacters(Boolean.toString(preAcknowledge));
xmlWriter.writeEndElement();
boolean useGlobalPools = jmsConnectionFactory.getConfig().isUseGlobalPools();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_USE_GLOBAL_POOLS);
xmlWriter.writeCharacters(Boolean.toString(useGlobalPools));
xmlWriter.writeEndElement();
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONNECTORS);
for (String connector : jmsConnectionFactory.getConfig().getConnectorNames())
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_CONNECTION_FACTORY_CONNECTOR);
xmlWriter.writeCharacters(connector);
xmlWriter.writeEndElement();
}
xmlWriter.writeEndElement();
xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRIES);
PersistedJNDI jndi = jmsJNDI.get(new Pair<>(PersistedType.ConnectionFactory, jmsConnectionFactory.getName()));
for (String jndiEntry : jndi.getJndi())
{
xmlWriter.writeStartElement(XmlDataConstants.JMS_JNDI_ENTRY);
xmlWriter.writeCharacters(jndiEntry);
xmlWriter.writeEndElement();