@Test(timeout = 30000) public void testCreateDurableConsumer() { JMSContext context = cf.createContext(); Topic topic = context.createTopic(getTestName()); assertNotNull(context.createDurableConsumer(topic, "test")); context.close(); try { context.createDurableConsumer(topic, "test"); fail("Should not be able to create resource when context is closed"); } catch (IllegalStateRuntimeException isre) {} }
@Override public JMSConsumer createDurableConsumer(Topic topic, String name) { try { return startIfNeeded(new JmsPoolJMSConsumer((JmsPoolMessageConsumer) getSession().createDurableConsumer(topic, name))); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } }
JmsPoolJMSContext implements JMSContext, AutoCloseable { @Override public JMSConsumer createDurableConsumer(Topic topic, String name) { try { return startIfNeeded(new JmsPoolJMSConsumer((JmsPoolMessageConsumer) getSession().createDurableConsumer(topic, name))); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } } }
JmsPoolJMSContext implements JMSContext, AutoCloseable { @Override public JMSConsumer createDurableConsumer(Topic topic, String name) { try { return startIfNeeded(new JmsPoolJMSConsumer((JmsPoolMessageConsumer) getSession().createDurableConsumer(topic, name))); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } } JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode); private  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode, AtomicLong connectionRefCount); }
JmsPoolJMSContext implements JMSContext, AutoCloseable { @Override public JMSConsumer createDurableConsumer(Topic topic, String name) { try { return startIfNeeded(new JmsPoolJMSConsumer((JmsPoolMessageConsumer) getSession().createDurableConsumer(topic, name))); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } } JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode); private  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode, AtomicLong connectionRefCount); @Override void start(); @Override void stop(); @Override synchronized void close(); @Override void acknowledge(); @Override void commit(); @Override void rollback(); @Override void recover(); @Override void unsubscribe(String name); @Override BytesMessage createBytesMessage(); @Override MapMessage createMapMessage(); @Override Message createMessage(); @Override ObjectMessage createObjectMessage(); @Override ObjectMessage createObjectMessage(Serializable object); @Override StreamMessage createStreamMessage(); @Override TextMessage createTextMessage(); @Override TextMessage createTextMessage(String text); @Override Queue createQueue(String queueName); @Override Topic createTopic(String topicName); @Override TemporaryQueue createTemporaryQueue(); @Override TemporaryTopic createTemporaryTopic(); @Override synchronized JMSContext createContext(int sessionMode); @Override JMSProducer createProducer(); @Override JMSConsumer createConsumer(Destination destination); @Override JMSConsumer createConsumer(Destination destination, String selector); @Override JMSConsumer createConsumer(Destination destination, String selector, boolean noLocal); @Override JMSConsumer createDurableConsumer(Topic topic, String name); @Override JMSConsumer createDurableConsumer(Topic topic, String name, String selector, boolean noLocal); @Override JMSConsumer createSharedConsumer(Topic topic, String name); @Override JMSConsumer createSharedConsumer(Topic topic, String name, String selector); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name, String selector); @Override QueueBrowser createBrowser(Queue queue); @Override QueueBrowser createBrowser(Queue queue, String selector); @Override boolean getAutoStart(); @Override void setAutoStart(boolean autoStart); @Override String getClientID(); @Override void setClientID(String clientID); @Override ExceptionListener getExceptionListener(); @Override void setExceptionListener(ExceptionListener listener); @Override ConnectionMetaData getMetaData(); @Override int getSessionMode(); @Override boolean getTransacted(); @Override String toString(); Connection getConnection(); }
JmsPoolJMSContext implements JMSContext, AutoCloseable { @Override public JMSConsumer createDurableConsumer(Topic topic, String name) { try { return startIfNeeded(new JmsPoolJMSConsumer((JmsPoolMessageConsumer) getSession().createDurableConsumer(topic, name))); } catch (JMSException jmse) { throw JMSExceptionSupport.createRuntimeException(jmse); } } JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode); private  JmsPoolJMSContext(JmsPoolConnection connection, int sessionMode, AtomicLong connectionRefCount); @Override void start(); @Override void stop(); @Override synchronized void close(); @Override void acknowledge(); @Override void commit(); @Override void rollback(); @Override void recover(); @Override void unsubscribe(String name); @Override BytesMessage createBytesMessage(); @Override MapMessage createMapMessage(); @Override Message createMessage(); @Override ObjectMessage createObjectMessage(); @Override ObjectMessage createObjectMessage(Serializable object); @Override StreamMessage createStreamMessage(); @Override TextMessage createTextMessage(); @Override TextMessage createTextMessage(String text); @Override Queue createQueue(String queueName); @Override Topic createTopic(String topicName); @Override TemporaryQueue createTemporaryQueue(); @Override TemporaryTopic createTemporaryTopic(); @Override synchronized JMSContext createContext(int sessionMode); @Override JMSProducer createProducer(); @Override JMSConsumer createConsumer(Destination destination); @Override JMSConsumer createConsumer(Destination destination, String selector); @Override JMSConsumer createConsumer(Destination destination, String selector, boolean noLocal); @Override JMSConsumer createDurableConsumer(Topic topic, String name); @Override JMSConsumer createDurableConsumer(Topic topic, String name, String selector, boolean noLocal); @Override JMSConsumer createSharedConsumer(Topic topic, String name); @Override JMSConsumer createSharedConsumer(Topic topic, String name, String selector); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name); @Override JMSConsumer createSharedDurableConsumer(Topic topic, String name, String selector); @Override QueueBrowser createBrowser(Queue queue); @Override QueueBrowser createBrowser(Queue queue, String selector); @Override boolean getAutoStart(); @Override void setAutoStart(boolean autoStart); @Override String getClientID(); @Override void setClientID(String clientID); @Override ExceptionListener getExceptionListener(); @Override void setExceptionListener(ExceptionListener listener); @Override ConnectionMetaData getMetaData(); @Override int getSessionMode(); @Override boolean getTransacted(); @Override String toString(); Connection getConnection();  }