@Test public void testPublishWithOverrides() throws JMSException { JmsPoolConnection connection = (JmsPoolConnection) cf.createTopicConnection(); TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = session.createTemporaryTopic(); TopicPublisher publisher = session.createPublisher(topic); final AtomicBoolean published = new AtomicBoolean(); MockJMSConnection mockConnection = (MockJMSConnection) connection.getConnection(); mockConnection.addConnectionListener(new MockJMSDefaultConnectionListener() { @Override public void onMessageSend(MockJMSSession session, MockJMSMessageProducer producer, Message message) throws JMSException { assertEquals(DeliveryMode.PERSISTENT, message.getJMSDeliveryMode()); assertEquals(9, message.getJMSPriority()); assertTrue(message.getJMSExpiration() != 0); published.set(true); } }); publisher.publish(session.createTextMessage(), DeliveryMode.PERSISTENT, 9, 1000); assertTrue(published.get()); }
@Override public void publish(Message message) throws JMSException { super.send(message); }
JmsPoolTopicPublisher extends JmsPoolMessageProducer implements TopicPublisher, AutoCloseable { @Override public void publish(Message message) throws JMSException { super.send(message); } }
JmsPoolTopicPublisher extends JmsPoolMessageProducer implements TopicPublisher, AutoCloseable { @Override public void publish(Message message) throws JMSException { super.send(message); } JmsPoolTopicPublisher(JmsPoolSession session, TopicPublisher messageProducer, Destination destination, AtomicInteger refCount); }
JmsPoolTopicPublisher extends JmsPoolMessageProducer implements TopicPublisher, AutoCloseable { @Override public void publish(Message message) throws JMSException { super.send(message); } JmsPoolTopicPublisher(JmsPoolSession session, TopicPublisher messageProducer, Destination destination, AtomicInteger refCount); @Override Topic getTopic(); @Override void publish(Message message); @Override void publish(Message message, int deliveryMode, int priority, long timeToLive); @Override void publish(Topic topic, Message message); @Override void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive); @Override String toString(); TopicPublisher getTopicPublisher(); }
JmsPoolTopicPublisher extends JmsPoolMessageProducer implements TopicPublisher, AutoCloseable { @Override public void publish(Message message) throws JMSException { super.send(message); } JmsPoolTopicPublisher(JmsPoolSession session, TopicPublisher messageProducer, Destination destination, AtomicInteger refCount); @Override Topic getTopic(); @Override void publish(Message message); @Override void publish(Message message, int deliveryMode, int priority, long timeToLive); @Override void publish(Topic topic, Message message); @Override void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive); @Override String toString(); TopicPublisher getTopicPublisher();  }