{
PropertyConfigurator.configure(testSettings);
log4jConfigured = true;
}
Settings settings = new Settings(testSettings);
if (listener != null)
{
listener.stop();
listener = null;
}
try
{
FFMQEngine.getDeployedInstance(TestUtils.LOCAL_ENGINE_NAME).undeploy();
}
catch (JMSException e)
{
// Ignore
}
engine = new FFMQEngine(TestUtils.LOCAL_ENGINE_NAME,settings,null);
engine.deploy();
// engine.deleteQueue("TEST1");
// engine.deleteQueue("TEST2");
// engine.deleteTopic("TEST1");
// engine.deleteTopic("TEST2");
queue1 = engine.getLocalQueue("TEST1");
queue2 = engine.getLocalQueue("TEST2");
topic1 = engine.getLocalTopic("TEST1");
topic2 = engine.getLocalTopic("TEST2");
((LocalQueue)queue1).purge(null);
((LocalQueue)queue2).purge(null);
((LocalTopic)topic1).resetStats();
//topic2.resetStats();
if (isRemote())
{
boolean useNIO = settings.getBooleanProperty("listener.tcp.useNIO",false);
if (useNIO)
{
listener = new NIOTcpListener(engine,
FFMQConstants.DEFAULT_SERVER_HOST,
TestUtils.TEST_SERVER_PORT,