/** * Invoke the handler, wrapping any exception to a {@link ListenerExecutionFailedException} * with a dedicated error message. */ @Nullable private Object invokeHandler(javax.jms.Message jmsMessage, @Nullable Session session, Message<?> message) { InvocableHandlerMethod handlerMethod = getHandlerMethod(); try { return handlerMethod.invoke(message, jmsMessage, session); } catch (MessagingException ex) { throw new ListenerExecutionFailedException( createMessagingErrorMessage("Listener method could not be invoked with incoming message"), ex); } catch (Exception ex) { throw new ListenerExecutionFailedException("Listener method '" + handlerMethod.getMethod().toGenericString() + "' threw exception", ex); } }
throw new ListenerExecutionFailedException( "Listener method '" + methodName + "' threw exception", targetEx); throw new ListenerExecutionFailedException("Failed to invoke target method '" + methodName + "' with arguments " + ObjectUtils.nullSafeToString(arguments), ex);
public Object doInJms(Session session) throws JMSException { try { processExchange(exchange, session, context); } catch (Exception e) { throw new ListenerExecutionFailedException("Exchange processing failed", e); } return null; } });
public Object doInJms(Session session) throws JMSException { try { sendError(exchange, error, session, context); } catch (Exception e) { throw new ListenerExecutionFailedException("Exchange processing failed", e); } return null; } });
public void onMessage(Message message) { try { JmsJcaConsumerEndpoint.this.onMessage(message, null); } catch (JMSException e) { throw new ListenerExecutionFailedException("Unable to handle message", e); } } }, tm);
/** * Invoke the handler, wrapping any exception to a {@link ListenerExecutionFailedException} * with a dedicated error message. */ @Nullable private Object invokeHandler(javax.jms.Message jmsMessage, @Nullable Session session, Message<?> message) { InvocableHandlerMethod handlerMethod = getHandlerMethod(); try { return handlerMethod.invoke(message, jmsMessage, session); } catch (MessagingException ex) { throw new ListenerExecutionFailedException( createMessagingErrorMessage("Listener method could not be invoked with incoming message"), ex); } catch (Exception ex) { throw new ListenerExecutionFailedException("Listener method '" + handlerMethod.getMethod().toGenericString() + "' threw exception", ex); } }
/** * Invoke the handler, wrapping any exception to a {@link ListenerExecutionFailedException} * with a dedicated error message. */ private Object invokeHandler(javax.jms.Message jmsMessage, Session session, Message<?> message) { try { return this.handlerMethod.invoke(message, jmsMessage, session); } catch (MessagingException ex) { throw new ListenerExecutionFailedException( createMessagingErrorMessage("Listener method could not be invoked with incoming message"), ex); } catch (Exception ex) { throw new ListenerExecutionFailedException("Listener method '" + this.handlerMethod.getMethod().toGenericString() + "' threw exception", ex); } }
throw new ListenerExecutionFailedException( "Listener method '" + methodName + "' threw exception", targetEx); throw new ListenerExecutionFailedException("Failed to invoke target method '" + methodName + "' with arguments " + ObjectUtils.nullSafeToString(arguments), ex);
throw new ListenerExecutionFailedException( "Listener method '" + methodName + "' threw exception", targetEx); throw new ListenerExecutionFailedException("Failed to invoke target method '" + methodName + "' with arguments " + ObjectUtils.nullSafeToString(arguments), ex);