consumers.setDestination(queueName);
consumers.setSessionFactory(manager.getConsumerSessionFactory());
consumers.setServiceManager(manager);
queueResource.setConsumers(consumers);
PushConsumerResource push = new PushConsumerResource();
push.setDestination(queueName);
push.setSessionFactory(manager.getConsumerSessionFactory());
queueResource.setPushConsumers(push);
PostMessage sender = null;
if (duplicates)
{
sender = new PostMessageDupsOk();
}
else
{
sender = new PostMessageNoDups();
}
sender.setServiceManager(manager);
sender.setDefaultDurable(defaultDurable);
sender.setDestination(queueName);
sender.setSessionFactory(manager.getSessionFactory());
sender.setPoolSize(manager.getProducerPoolSize());
sender.setProducerTimeToLive(manager.getProducerTimeToLive());
sender.init();
queueResource.setSender(sender);
if (manager.getPushStore() != null)
{
push.setPushStore(manager.getPushStore());
List<PushRegistration> regs = manager.getPushStore().getByDestination(queueName);
for (PushRegistration reg : regs)
{
push.addRegistration(reg);
}
}
queueResource.start();
getQueues().put(queueName, queueResource);