public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }
/** * convert a concrete messaging exception to fake messaging exception. * @param e * the concrete messaging exception * @return * the fake messaging exception */ public static MessagingException convertMessagingException( final MessagingException e) { MessagingException me = new MessagingException(e.getMessage()); me.setStackTrace(e.getStackTrace()); return me; }
log.error(e.getMessage(), e); Throwable causeException = e.getCause(); while (causeException != null) { if (causeException instanceof InterruptedException) { throw new MessagingException(e);
XMLHelper.createStringFromDOMDocument(requestDoc))); } catch (final TransformerException e) { throw new MessagingException(e); throw new MessagingException( "No SQL service has been found for the service " + exchange.getService()); } catch (final SQLException | ParseException | IOException | XMLStreamException e) { this.addMonitFailureStepExtTrace(newFlowStepId, e); throw new MessagingException(e); this.getLogger().log(Level.WARNING, e.getMessage(), e); exchange.setError(e);
public void run() { while (running) { try { DeliveryChannel deliveryChannel = context.getDeliveryChannel(); LOGGER.info("about to do an accept on deliveryChannel: {}", deliveryChannel); MessageExchange messageExchange = deliveryChannel.accept(); LOGGER.info("received me: {}", messageExchange); onMessageExchange(messageExchange); } catch (MessagingException e) { LOGGER.error("Failed to process inbound messages: {}", e.getMessage(), e); } } }
this.log.debug(e.getMessage()); Throwable causeException = e.getCause(); while (causeException != null) { if (causeException instanceof InterruptedException) {
public DSBServiceServerImpl(ComponentContext componentContext) { this.componentContext = componentContext; try { this.channel = this.componentContext.getDeliveryChannel(); } catch (MessagingException e) { e.printStackTrace(); } try { this.logger = this.componentContext.getLogger("", null); } catch (MissingResourceException e) { e.printStackTrace(); } catch (JBIException e) { e.printStackTrace(); } }
/** * Process an active exchange (ie, with status ACTIVE) * * @param exchange */ private void processActiveExchange(final Exchange exchange) { try { validateExchange(exchange); if (exchange.getFault() == null) { this.getService(exchange.getOperation()).process(exchange, exchange.getInMessageContentAsDocument()); } else { exchange.setDoneStatus(); } } catch (final MessagingException e) { final StringBuilder builder = new StringBuilder(); builder.append("[Exchange Id:"); builder.append(exchange.getExchangeId()); builder.append("] - "); builder.append(e.getClass().getSimpleName() + " : " + e.getMessage()); this.getLogger().log(Level.WARNING, builder.toString()); exchange.setError(e); } }
public JBIClient(ComponentContext componentContext) { this.componentContext = componentContext; // TODO : initialize somewhere else try { this.messageExchangeFactory = this.componentContext.getDeliveryChannel() .createExchangeFactory(); } catch (MessagingException e) { e.printStackTrace(); } try { this.logger = this.componentContext.getLogger("", null); } catch (MissingResourceException e) { e.printStackTrace(); } catch (JBIException e) { e.printStackTrace(); } }
public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }
/** Provides metadata query facility for endpoints registered with the NMR. * This method returns the contents of an XML descriptor as a string. * @param service string representation of service QName * @param endpoint endpoint name * @return XML descriptor as string */ public String getDescriptor(String service, String endpoint) { RegisteredEndpoint re; Document desc; String descStr = null; re = mRegistry.getInternalEndpoint(new QName(service), endpoint); try { desc = queryDescriptor(re); if (desc != null) { descStr = XMLUtil.getInstance().asString(desc); } } catch (javax.jbi.messaging.MessagingException msgEx) { mLog.warning(msgEx.getMessage()); } return descStr; }
fault.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); message.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
/** * Check if the <code>DeliveryChannel</code> is opened * * @throws MessagingException */ public synchronized void checkDeliveryChannelIsOpened() throws MessagingException { if (!opened) { throw new MessagingException("DeliveryChannel is closed."); } }
mLog.warning(msgEx.getMessage()); throw msgEx;
public void dispatch(MessageExchange exchange) { // create a Message from the message exhange and send it to the // listener... if (getListener() == null) { return; } // TODO : Check faults and errors... if (exchange != null && exchange.getMessage("in") != null) { Message message = Adapter.transform(exchange.getMessage("in")); Message out = getListener().onMessage(message); if (out != null) { // set the out message in the exchange try { exchange.setMessage(Adapter.transform(out), "out"); } catch (MessagingException e) { e.printStackTrace(); } } } } }
/** * Check if the <code>DeliveryChannel</code> is opened * * @throws MessagingException */ public void checkDeliveryChannelIsOpened() throws MessagingException { if (!this.opened) { throw new MessagingException("DeliveryChannel is closed"); } }
.getOperationName(), false); } catch (MessagingException e) { this.log.warning(e.getMessage());
fault.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); message.setContent(createSource(state.content)); } catch (MessagingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
public void afterPropertiesSet() throws Exception { if (interf == null && service == null && uri == null) { throw new MessagingException("interface, service or uri should be specified"); } }
/** * See {@link PetalsMessageExchange#getTermination()} documentation to understand why this check is needed. */ private void checkIsNotTerminated() throws MessagingException { if (this.termination != null) { throw new MessagingException( "The MessageExchange state does not allow this operation: exchange is terminated (reason: " + this.termination + ")"); } }