PushSubscriptionsResource push = new PushSubscriptionsResource();
push.setDestination(topicName);
push.setSessionFactory(manager.getConsumerSessionFactory());
topicResource.setPushSubscriptions(push);
PostMessage sender = null;
if (duplicates)
{
sender = new PostMessageDupsOk();
}
else
{
sender = new PostMessageNoDups();
}
sender.setDefaultDurable(defaultDurable);
sender.setDestination(topicName);
sender.setSessionFactory(manager.getSessionFactory());
sender.setPoolSize(manager.getProducerPoolSize());
sender.setProducerTimeToLive(manager.getProducerTimeToLive());
sender.setServiceManager(manager);
sender.init();
topicResource.setSender(sender);
if (manager.getPushStore() != null)
{
push.setPushStore(manager.getPushStore());