@Override public int getDeliveryMode() throws JMSException { return delegate.getDeliveryMode(); }
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 getDeliveryMode() { try { return producer.getDeliveryMode(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
protected int getDeliveryMode(Map headers) throws JMSException { Object o = headers.remove(Stomp.Headers.Send.PERSISTENT); if (o != null) { return "true".equals(o) ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; } else { return getProducer().getDeliveryMode(); } }
public int getDeliveryMode() throws ProducerException { try { return this.producer.getDeliveryMode(); } catch (Exception e) { throw new ProducerException("Failed to get DelieveryMode"); } }
/** Delegates the call to the wrapped producer. */ public int getDeliveryMode() throws JMSException { checkValidity(); return producer.getDeliveryMode(); }
/** Delegates the call to the wrapped producer. */ public int getDeliveryMode() throws JMSException { checkValidity(); return producer.getDeliveryMode(); }
public CachedMessageProducer(MessageProducer target) throws JMSException { this.target = target; this.deliveryMode = target.getDeliveryMode(); this.priority = target.getPriority(); this.timeToLive = target.getTimeToLive(); }
/** * Get the delivery mode * * @return The mode * @throws JMSException Thrown if an error occurs */ @Override public int getDeliveryMode() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("getRoutingType()"); } return producer.getDeliveryMode(); }
public CachedMessageProducer(MessageProducer target) throws JMSException { this.target = target; this.deliveryMode = target.getDeliveryMode(); this.priority = target.getPriority(); this.timeToLive = target.getTimeToLive(); }
@Override public int getDeliveryMode() { try { return producer.getDeliveryMode(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getDeliveryMode() { try { return producer.getDeliveryMode(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getDeliveryMode() { try { return producer.getDeliveryMode(); } catch (JMSException e) { JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Override public int getDeliveryMode() { try { return producer.getDeliveryMode(); } catch (final JMSException e) { final JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage()); e2.initCause(e); throw e2; } }
@Test public void testDefaultDeliveryMode() 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(DeliveryMode.PERSISTENT, tp.getDeliveryMode()); ProxyAssertSupport.assertEquals(DeliveryMode.PERSISTENT, qp.getDeliveryMode()); } finally { pconn.close(); } }
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(); }
@Test public void testDefaultDeliveryMode() throws Exception { ProxyAssertSupport.assertEquals(DeliveryMode.PERSISTENT, queueProducer.getDeliveryMode()); }
@Test public void testPersistentDeliveryMode() throws Exception { queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT); ProxyAssertSupport.assertEquals(DeliveryMode.PERSISTENT, queueProducer.getDeliveryMode()); Message m = queueProducerSession.createMessage(); queueProducer.send(m); ProxyAssertSupport.assertEquals(DeliveryMode.PERSISTENT, queueConsumer.receive().getJMSDeliveryMode()); }
@Test public void testNonPersistentDeliveryMode() throws Exception { queueProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); ProxyAssertSupport.assertEquals(DeliveryMode.NON_PERSISTENT, queueProducer.getDeliveryMode()); Message m = queueProducerSession.createMessage(); queueProducer.send(m); ProxyAssertSupport.assertEquals(DeliveryMode.NON_PERSISTENT, queueConsumer.receive().getJMSDeliveryMode()); }