@Test public void testCommitFailsDueToJMSException() throws JMSException { doThrow(new JMSException("")).when(session).commit(); consumer = create(); consumer.commit(); }
void commit() { try { session.commit(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing commit", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing commit", runtimeException); } }
JMSMessageConsumer { void commit() { try { session.commit(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing commit", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing commit", runtimeException); } } }
JMSMessageConsumer { void commit() { try { session.commit(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing commit", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing commit", runtimeException); } } JMSMessageConsumer(InitialContext initialContext, ConnectionFactory connectionFactory,
                     String destinationName, JMSDestinationLocator destinationLocator,
                     JMSDestinationType destinationType, String messageSelector, int batchSize,
                     long pollTimeout, JMSMessageConverter messageConverter,
                     Optional<String> userName, Optional<String> password,
                     Optional<String> clientId, boolean createDurableSubscription,
                     String durableSubscriptionName); }
JMSMessageConsumer { void commit() { try { session.commit(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing commit", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing commit", runtimeException); } } JMSMessageConsumer(InitialContext initialContext, ConnectionFactory connectionFactory,
                     String destinationName, JMSDestinationLocator destinationLocator,
                     JMSDestinationType destinationType, String messageSelector, int batchSize,
                     long pollTimeout, JMSMessageConverter messageConverter,
                     Optional<String> userName, Optional<String> password,
                     Optional<String> clientId, boolean createDurableSubscription,
                     String durableSubscriptionName);  }
JMSMessageConsumer { void commit() { try { session.commit(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing commit", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing commit", runtimeException); } } JMSMessageConsumer(InitialContext initialContext, ConnectionFactory connectionFactory,
                     String destinationName, JMSDestinationLocator destinationLocator,
                     JMSDestinationType destinationType, String messageSelector, int batchSize,
                     long pollTimeout, JMSMessageConverter messageConverter,
                     Optional<String> userName, Optional<String> password,
                     Optional<String> clientId, boolean createDurableSubscription,
                     String durableSubscriptionName);   }