@Test public void testJMSExOnConsumerCloseConvertedToJMSREx() throws JMSException { JMSConsumer consumer = context.createConsumer(context.createTemporaryQueue()); MockJMSConnection connection = (MockJMSConnection) context.getConnection(); connection.addConnectionListener(new MockJMSDefaultConnectionListener() { @Override public void onCloseMessageConsumer(MockJMSSession session, MockJMSMessageConsumer consumer) throws JMSException { throw new IllegalStateException("Some failure"); } }); try { consumer.close(); fail("Should throw on wrapped consumer throw"); } catch (IllegalStateRuntimeException isre) {} }
@Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); @Override void close(); @Override MessageListener getMessageListener(); @Override String getMessageSelector(); @Override void setMessageListener(MessageListener listener); @Override Message receive(); @Override Message receive(long timeout); @Override Message receiveNoWait(); @Override T receiveBody(Class<T> desired); @Override T receiveBody(Class<T> desired, long timeout); @Override T receiveBodyNoWait(Class<T> desired); @Override String toString(); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public void close() { try { consumer.close(); } catch (JMSException e) { throw JMSExceptionSupport.createRuntimeException(e); } } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); @Override void close(); @Override MessageListener getMessageListener(); @Override String getMessageSelector(); @Override void setMessageListener(MessageListener listener); @Override Message receive(); @Override Message receive(long timeout); @Override Message receiveNoWait(); @Override T receiveBody(Class<T> desired); @Override T receiveBody(Class<T> desired, long timeout); @Override T receiveBodyNoWait(Class<T> desired); @Override String toString();  }