qResourceAdapter.stop();
}
public void testResourceAdapterSetupOverrideDiscovery() throws Exception
{
HornetQResourceAdapter qResourceAdapter = new HornetQResourceAdapter();
qResourceAdapter.setDiscoveryAddress("231.7.7.7");
//qResourceAdapter.getTransactionManagerLocatorClass
HornetQRATestBase.MyBootstrapContext ctx = new HornetQRATestBase.MyBootstrapContext();
qResourceAdapter.setTransactionManagerLocatorClass("");
qResourceAdapter.start(ctx);
HornetQActivationSpec spec = new HornetQActivationSpec();
spec.setResourceAdapter(qResourceAdapter);
spec.setUseJNDI(false);
spec.setDestinationType("javax.jms.Queue");
spec.setDestination(MDBQUEUE);
spec.setSetupAttempts(0);
spec.setDiscoveryAddress("231.6.6.6");
spec.setDiscoveryPort(1234);
spec.setDiscoveryInitialWaitTimeout(1l);
spec.setDiscoveryRefreshTimeout(1l);
HornetQConnectionFactory fac = qResourceAdapter.createHornetQConnectionFactory(spec);
assertEquals(fac.getServerLocator().getDiscoveryGroupConfiguration().getGroupAddress(), "231.6.6.6");
assertEquals(fac.getServerLocator().getDiscoveryGroupConfiguration().getGroupPort(), 1234);
assertEquals(fac.getServerLocator().getDiscoveryGroupConfiguration().getRefreshTimeout(), 1l);
assertEquals(fac.getServerLocator().getDiscoveryGroupConfiguration().getDiscoveryInitialWaitTimeout(), 1l);
qResourceAdapter.stop();
}