public synchronized void registerQueue(final HornetQQueue queue, final Queue serverQueue) throws Exception
{
QueueControl coreQueueControl = (QueueControl)managementService.getResource(ResourceNames.CORE_QUEUE + queue.getAddress());
MessageCounterManager messageCounterManager = managementService.getMessageCounterManager();
MessageCounter counter = new MessageCounter(queue.getName(),
null,
serverQueue,
false,
coreQueueControl.isDurable(),
messageCounterManager.getMaxDayCount());