if(discoveryPort == null)
{
discoveryPort = HornetQClient.DEFAULT_DISCOVERY_PORT;
}
DiscoveryGroupConfiguration groupConfiguration = new DiscoveryGroupConfiguration(discoveryAddress, discoveryPort);
if (log.isDebugEnabled())
{
log.debug("Creating Connection Factory on the resource adapter for discovery=" + groupConfiguration + " with ha=" + ha);
}
Long refreshTimeout = overrideProperties.getDiscoveryRefreshTimeout() != null ? overrideProperties.getDiscoveryRefreshTimeout()
: raProperties.getDiscoveryRefreshTimeout();
if (refreshTimeout == null)
{
refreshTimeout = HornetQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT;
}
Long initialTimeout = overrideProperties.getDiscoveryInitialWaitTimeout() != null ? overrideProperties.getDiscoveryInitialWaitTimeout()
: raProperties.getDiscoveryInitialWaitTimeout();
if(initialTimeout == null)
{
initialTimeout = HornetQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
}
groupConfiguration.setDiscoveryInitialWaitTimeout(initialTimeout);
groupConfiguration.setRefreshTimeout(refreshTimeout);
if (ha)
{
cf = HornetQJMSClient.createConnectionFactoryWithHA(groupConfiguration, JMSFactoryType.XA_CF);
}