@Override public int getPriority() throws JMSException { return delegate.getPriority(); }
public CachedMessageProducer(MessageProducer target) throws JMSException { this.target = target; this.deliveryMode = target.getDeliveryMode(); this.priority = target.getPriority(); this.timeToLive = target.getTimeToLive(); }
@Override public void sendMessage(GoMessage goMessage, long timeToLive) { try { producer.send(session.createObjectMessage(goMessage), producer.getDeliveryMode(), producer.getPriority(), timeToLive); } catch (JMSException e) { throw bomb(e); } }
@Override public int getPriority() { try { return producer.getPriority(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Test public void testProducerCallback() throws Exception { JmsTemplate template = createTemplate(); template.setConnectionFactory(this.connectionFactory); MessageProducer messageProducer = mock(MessageProducer.class); given(this.session.createProducer(null)).willReturn(messageProducer); given(messageProducer.getPriority()).willReturn(4); template.execute((ProducerCallback<Void>) (session1, producer) -> { session1.getTransacted(); producer.getPriority(); return null; }); verify(messageProducer).close(); verify(this.session).close(); verify(this.connection).close(); }
@Test public void testProducerCallbackWithIdAndTimestampDisabled() throws Exception { JmsTemplate template = createTemplate(); template.setConnectionFactory(this.connectionFactory); template.setMessageIdEnabled(false); template.setMessageTimestampEnabled(false); MessageProducer messageProducer = mock(MessageProducer.class); given(this.session.createProducer(null)).willReturn(messageProducer); given(messageProducer.getPriority()).willReturn(4); template.execute((ProducerCallback<Void>) (session1, producer) -> { session1.getTransacted(); producer.getPriority(); return null; }); verify(messageProducer).setDisableMessageID(true); verify(messageProducer).setDisableMessageTimestamp(true); verify(messageProducer).close(); verify(this.session).close(); verify(this.connection).close(); }
/** Delegates the call to the wrapped producer. */ public int getPriority() throws JMSException { checkValidity(); return producer.getPriority(); }
protected int getPriority(Map headers) throws JMSException { Object o = headers.remove(Stomp.Headers.Send.PRIORITY); if (o != null) { return Integer.parseInt((String) o); } else { return getProducer().getPriority(); } }
public CachedMessageProducer(MessageProducer target) throws JMSException { this.target = target; this.deliveryMode = target.getDeliveryMode(); this.priority = target.getPriority(); this.timeToLive = target.getTimeToLive(); }
public CachedMessageProducer(MessageProducer target) throws JMSException { this.target = target; this.deliveryMode = target.getDeliveryMode(); this.priority = target.getPriority(); this.timeToLive = target.getTimeToLive(); }
/** * Get the priority * * @return The priority * @throws JMSException Thrown if an error occurs */ @Override public int getPriority() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getPriority()"); } return producer.getPriority(); }
/** * Get the priority * * @return The priority * @throws JMSException Thrown if an error occurs */ @Override public int getPriority() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getPriority()"); } return producer.getPriority(); }
@Override public int getPriority() { try { return producer.getPriority(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getPriority() { try { return producer.getPriority(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getPriority() { try { return producer.getPriority(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getPriority() { try { return producer.getPriority(); } catch (final JMSException e) { final JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Test public void testDefaultPriority() throws Exception { Connection pconn = createConnection(); try { Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer tp = ps.createProducer(ActiveMQServerTestCase.topic1); MessageProducer qp = ps.createProducer(queue1); ProxyAssertSupport.assertEquals(4, tp.getPriority()); ProxyAssertSupport.assertEquals(4, qp.getPriority()); } finally { pconn.close(); } }
public PooledProducer(final MessageProducer messageProducer, final Destination destination) throws JMSException { this.messageProducer = messageProducer; this.destination = destination; this.deliveryMode = messageProducer.getDeliveryMode(); this.disableMessageID = messageProducer.getDisableMessageID(); this.disableMessageTimestamp = messageProducer.getDisableMessageTimestamp(); this.priority = messageProducer.getPriority(); this.timeToLive = messageProducer.getTimeToLive(); }
public PooledProducer(MessageProducer messageProducer, Destination destination) throws JMSException { this.messageProducer = messageProducer; this.destination = destination; this.anonymous = messageProducer.getDestination() == null; this.deliveryMode = messageProducer.getDeliveryMode(); this.disableMessageID = messageProducer.getDisableMessageID(); this.disableMessageTimestamp = messageProducer.getDisableMessageTimestamp(); this.priority = messageProducer.getPriority(); this.timeToLive = messageProducer.getTimeToLive(); }
public PooledProducer(MessageProducer messageProducer, Destination destination) throws JMSException { this.messageProducer = messageProducer; this.destination = destination; this.anonymous = messageProducer.getDestination() == null; this.deliveryMode = messageProducer.getDeliveryMode(); this.disableMessageID = messageProducer.getDisableMessageID(); this.disableMessageTimestamp = messageProducer.getDisableMessageTimestamp(); this.priority = messageProducer.getPriority(); this.timeToLive = messageProducer.getTimeToLive(); }