public HornetQConnectionFactory(final boolean ha, final TransportConfiguration... initialConnectors) { if (ha) { serverLocator = HornetQClient.createServerLocatorWithHA(initialConnectors); } else { serverLocator = HornetQClient.createServerLocatorWithoutHA(initialConnectors); } serverLocator.disableFinalizeCheck(); }
public HornetQConnectionFactory(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { if (ha) { serverLocator = HornetQClient.createServerLocatorWithHA(groupConfiguration); } else { serverLocator = HornetQClient.createServerLocatorWithoutHA(groupConfiguration); } serverLocator.disableFinalizeCheck(); }
private ServerLocatorInternal getFailbackLocator(ClusterConnectionConfiguration config) throws HornetQException { ServerLocatorInternal locator; if (config.getDiscoveryGroupName() != null) { DiscoveryGroupConfiguration dg = configuration.getDiscoveryGroupConfigurations().get(config.getDiscoveryGroupName()); if (dg == null) { throw HornetQMessageBundle.BUNDLE.noDiscoveryGroupFound(dg); } locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(dg); } else { TransportConfiguration[] tcConfigs = config.getStaticConnectors() != null ? connectorNameListToArray(config.getStaticConnectors()) : null; locator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(tcConfigs); } return locator; }
serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(discoveryGroupConfiguration); serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(tcConfigs);
serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(discoveryGroupConfiguration); serverLocator = (ServerLocatorInternal) HornetQClient.createServerLocatorWithHA(tcConfigs);