/** * @param queueName queue name * @return true if queue is paused, false if not. */ public boolean isPaused(String queueName) { try { return getQueueControl(queueName).isPaused(); } catch (Exception e) { throw new AsyncException(e); } }
/** * @param queueName queue name * @return true if queue is paused, false if not. */ public boolean isPaused(String queueName) { try { return getQueueControl(queueName).isPaused(); } catch (Exception e) { throw new AsyncException(e); } }
context.getResult().set(control.isPaused()); } catch (RuntimeException e) { throw e;
context.getResult().set(control.isPaused()); } catch (RuntimeException e) { throw e;
} else if (PAUSED.getName().equals(attributeName)) { try { context.getResult().set(control.isPaused()); } catch (RuntimeException e) { throw e;
} else if (PAUSED.getName().equals(attributeName)) { try { context.getResult().set(control.isPaused()); } catch (RuntimeException e) { throw e;
@Test public void testPauseAndResume() { long counterPeriod = 1000; SimpleString address = RandomUtil.randomSimpleString(); SimpleString queue = RandomUtil.randomSimpleString(); try { session.createQueue(address, RoutingType.MULTICAST, queue, null, durable); QueueControl queueControl = createManagementControl(address, queue); ActiveMQServerControl serverControl = ManagementControlHelper.createActiveMQServerControl(mbeanServer); serverControl.enableMessageCounters(); serverControl.setMessageCounterSamplePeriod(counterPeriod); Assert.assertFalse(queueControl.isPaused()); queueControl.pause(); Assert.assertTrue(queueControl.isPaused()); queueControl.resume(); Assert.assertFalse(queueControl.isPaused()); } catch (Exception e) { e.printStackTrace(); } }
return matches(queue.isDurable()); case PAUSED: return matches(queue.isPaused()); case TEMPORARY: return matches(queue.isTemporary());