@Test public void testReceiveBodyTimed() throws JMSException { JMSConsumer consumer = context.createConsumer(context.createTemporaryQueue()); try { consumer.receiveBody(String.class, 1); fail("Should not be able to interact with closed consumer"); } catch (JMSRuntimeException ise) {} }
@Override public <T> T receiveBody(Class<T> desired) { throw new JMSRuntimeException("Pooled JMSConsumer does not support receiveBody"); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public <T> T receiveBody(Class<T> desired) { throw new JMSRuntimeException("Pooled JMSConsumer does not support receiveBody"); } }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public <T> T receiveBody(Class<T> desired) { throw new JMSRuntimeException("Pooled JMSConsumer does not support receiveBody"); } JmsPoolJMSConsumer(JmsPoolMessageConsumer consumer); }
JmsPoolJMSConsumer implements JMSConsumer, AutoCloseable { @Override public <T> T receiveBody(Class<T> desired) { throw new JMSRuntimeException("Pooled JMSConsumer does not support receiveBody"); } 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 <T> T receiveBody(Class<T> desired) { throw new JMSRuntimeException("Pooled JMSConsumer does not support receiveBody"); } 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();  }