@Test public void testRollbackFailsDueToRuntimeException() throws JMSException { doThrow(new RuntimeException()).when(session).rollback(); consumer = create(); consumer.rollback(); }
void rollback() { try { session.rollback(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing rollback", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing rollback", runtimeException); } }
JMSMessageConsumer { void rollback() { try { session.rollback(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing rollback", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing rollback", runtimeException); } } }
JMSMessageConsumer { void rollback() { try { session.rollback(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing rollback", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing rollback", 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 rollback() { try { session.rollback(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing rollback", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing rollback", 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 rollback() { try { session.rollback(); } catch (JMSException jmsException) { logger.warn("JMS Exception processing rollback", jmsException); } catch (RuntimeException runtimeException) { logger.warn("Runtime Exception processing rollback", 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);   }