spec.setDestination("test");
spec.setMinSession(1);
spec.setMaxSession(15);
HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec);
ServerLocatorImpl serverLocator = (ServerLocatorImpl) ra.getDefaultHornetQConnectionFactory().getServerLocator();
Field f = Class.forName(ServerLocatorImpl.class.getName()).getDeclaredField("factories");
f.setAccessible(true);
Set<ClientSessionFactoryInternal> factories = (Set<ClientSessionFactoryInternal>) f.get(serverLocator);
for (int i = 0; i < 10 ; i++)
{
System.out.println(i);
assertEquals(factories.size(), 0);
activation.start();
assertEquals(factories.size(), 15);
activation.stop();
assertEquals(factories.size(), 0);
}
System.out.println("before RA stop => " + factories.size());