public void handleException(MessageExchange exchange, SmxHttpExchange httpExchange, Throwable ex) { exchange.setError((Exception)ex); }
public void handleException(MessageExchange exchange, SmxHttpExchange httpExchange, Throwable ex) { exchange.setError((Exception)ex); }
protected void fail(MessageExchange me, Exception error) throws MessagingException { logger.warn("SimpleEndpoint.fail called: ", error); me.setError(error); send(me); }
private void outFailure(MyRoleMessageExchange odeMex, javax.jbi.messaging.MessageExchange jbiMex) throws MessagingException { jbiMex.setError(new Exception("MEXFailure")); jbiMex.setStatus(ExchangeStatus.ERROR); // TODO: get failure codes out of the message. }
private void setError(javax.jbi.messaging.MessageExchange jbiMex, Exception error) throws MessagingException { jbiMex.setError(error); jbiMex.setStatus(ExchangeStatus.ERROR); }
private void fail(MessageExchange exchange, Exception e) throws MessagingException { exchange.setError(e); channel.send(exchange); }
protected void handle(SmxHttpExchange httpExchange, MessageExchange exchange) throws IOException { try { marshaler.handleResponse(exchange, httpExchange); } catch (Exception e) { exchange.setError(e); } try { boolean txSync = exchange.getStatus() == ExchangeStatus.ACTIVE && exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC)); if (txSync) { sendSync(exchange); } else { send(exchange); } } catch (Exception e) { throw (IOException) new IOException(e.getMessage()).initCause(e); } }
/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { if (exchange instanceof InOnly || fault == null) { exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault)); } else { exchange.setFault(fault); } getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified error * @throws MessagingException */ public void fail(MessageExchange exchange, Exception error) throws MessagingException { if (exchange instanceof InOnly || !(error instanceof FaultException)) { exchange.setError(error); } else { FaultException faultException = (FaultException) error; exchange.setFault(faultException.getFault()); } getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified error */ public void fail(MessageExchange exchange, Exception error) throws MessagingException { if (error instanceof FaultException) { FaultException faultException = (FaultException) error; exchange.setFault(faultException.getFault()); } else { exchange.setError(error); } getDeliveryChannel().send(exchange); }
/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { if (exchange instanceof InOnly || fault == null) { exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault)); } else { exchange.setFault(fault); } getDeliveryChannel().send(exchange); }
TimeoutException timeoutException = new TimeoutException(); for (MessageExchange me : exchanges) { me.setError(timeoutException); me.setStatus(ExchangeStatus.ERROR); send(me);
/** * A helper method which fails and completes the given exchange with the specified error * @throws MessagingException */ public void fail(MessageExchange exchange, Exception error) throws MessagingException { if (exchange instanceof InOnly || !(error instanceof FaultException)) { exchange.setError(error); } else { FaultException faultException = (FaultException) error; exchange.setFault(faultException.getFault()); } getDeliveryChannel().send(exchange); }
protected void processExchangeWithoutTx(MessageExchange exchange) { ExchangeStatus oldStatus = exchange.getStatus(); try { processExchange(exchange); } catch (Throwable t) { logger.error("Error processing exchange {}", exchange, t); try { // If we are transacted and this is a runtime exception // try to mark transaction as rollback if (transactionManager != null && transactionManager.getStatus() == Status.STATUS_ACTIVE && exceptionShouldRollbackTx(t)) { transactionManager.setRollbackOnly(); if (!container.handleTransactions()) { transactionManager.suspend(); } } if (oldStatus == ExchangeStatus.ACTIVE) { exchange.setError(t instanceof Exception ? (Exception) t : new Exception(t)); channel.send(exchange); } } catch (Exception inner) { logger.error("Error setting exchange status to ERROR", inner); } } }
exchange.setError(new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP")); channel.send(exchange); return;
jbiMex.setStatus(ExchangeStatus.ERROR); if (err != null && jbiMex.getError() == null) jbiMex.setError(err); } else { if (jbiMex.getStatus() == ExchangeStatus.ACTIVE) jbiMex.setError(err); + jbiMex.getPattern()); jbiMex.setStatus(ExchangeStatus.ERROR); jbiMex.setError(new Exception("Unknown message exchange pattern: " + jbiMex.getPattern()));
for (MessageExchange me : exchanges) { if (exchange.getStatus() == ExchangeStatus.ERROR) { me.setError(exchange.getError());
fake.setError(concrete.getError());