https://issues.apache.org/jira/browse/AMQ-4930 - need to track paged in for queue count to match stat view - thanks MBeanTest and JmsQueueBrowserTest

This commit is contained in:
gtully 2014-08-08 15:33:11 +01:00
parent c391321d1b
commit f158e7da67
1 changed files with 2 additions and 2 deletions

View File

@ -1232,10 +1232,10 @@ public class Queue extends BaseDestination implements Task, UsageListener {
} finally { } finally {
pagedInMessagesLock.readLock().unlock(); pagedInMessagesLock.readLock().unlock();
} }
int messagesInQueue = 0; int messagesInQueue = alreadyPagedIn;
messagesLock.readLock().lock(); messagesLock.readLock().lock();
try { try {
messagesInQueue = messages.size(); messagesInQueue += messages.size();
} finally { } finally {
messagesLock.readLock().unlock(); messagesLock.readLock().unlock();
} }