[AMQ-6678] sync destructive purge on queue view mbean (jmx) to prevent concurrent calls

This commit is contained in:
gtully 2017-05-29 11:21:00 +01:00
parent 30d3162982
commit 00ee9491d9
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class QueueView extends DestinationView implements QueueViewMBean {
return result; return result;
} }
public void purge() throws Exception { public synchronized void purge() throws Exception {
final long originalMessageCount = destination.getDestinationStatistics().getMessages().getCount(); final long originalMessageCount = destination.getDestinationStatistics().getMessages().getCount();
((Queue)destination).purge(); ((Queue)destination).purge();