Package javax.jbi.messaging

Examples of javax.jbi.messaging.MessagingException


                    }
                    out = client.storeFileStream(name);
                }
            }
            if (out == null) {
                throw new MessagingException("No output stream available for output name: " + name + ". Maybe the file already exists?");
            }
            marshaler.writeMessage(exchange, message, out, name);
            done(exchange);
        }
        catch (MessagingException e) {
            throw e;
        }
        catch (Exception e) {
            throw new MessagingException(e);
        }
        finally {
            returnClient(client);
            if (out != null) {
                try {
View Full Code Here


            out = new BufferedOutputStream(new FileOutputStream(newFile));
            marshaler.writeMessage(exchange, message, out, name);
            done(exchange);
        }
        catch (IOException e) {
            throw new MessagingException(e);
        }
        catch (TransformerException e) {
            throw new MessagingException(e);
        }
        finally {
            if (out != null) {
                try {
                    out.close();
View Full Code Here

    }

    // Implementation methods
    //-------------------------------------------------------------------------
    protected void process(MessageExchange exchange, NormalizedMessage message) throws MessagingException {
        throw new MessagingException("This component is not meant to receive inbound messages but received: " + message);
    }
View Full Code Here

               
        try {
            method.invoke(target, args);
            done(messageExchange);
        } catch (IllegalArgumentException e) {
            throw new MessagingException(e);
        } catch (IllegalAccessException e) {
            throw new MessagingException(e);
        } catch (InvocationTargetException e) {
            throw new MessagingException(e);
        }
    }
View Full Code Here

                  } else {
                      System.err.println("Message delivery accepted: " + exchange.getExchangeId());
                    super.onMessageExchange(exchange);
                  }
              } catch (Exception e) {
                throw new MessagingException(e);
              }
              }
          };
        } else {
          receiver = new AsyncReceiverPojo() {
              public void onMessageExchange(MessageExchange exchange) throws MessagingException {
                try {
                  if (delivered.get(exchange.getExchangeId()) == null) {
                      System.err.println("Message delivery rolled back: " + exchange.getExchangeId());
                      delivered.put(exchange.getExchangeId(), Boolean.TRUE);
                    tm.setRollbackOnly();
                        exchange.setStatus(ExchangeStatus.DONE);
                        getContext().getDeliveryChannel().send(exchange);
                  } else {
                      System.err.println("Message delivery accepted: " + exchange.getExchangeId());
                    super.onMessageExchange(exchange);
                  }
              } catch (Exception e) {
                throw new MessagingException(e);
              }
              }
          };
        }
View Full Code Here

            else {
                writeMessageContent(exchange, message, out, name);
            }
        }
        catch (IOException e) {
            throw new MessagingException(e);
        }
    }
View Full Code Here

        }
        try {
            queue.enqueue(me);
        }
        catch (InterruptedException e) {
            throw new MessagingException(queue + " Failed to enqueue exchange: " + me, e);
        }
    }
View Full Code Here

            }
            transformer.transform(content, new StreamResult(out));
            done(exchange);
        }
        catch (TransformerException e) {
            throw new MessagingException(e);
        }
    }
View Full Code Here

                      return session.createObjectMessage(me);
          }
        });
            } catch (Exception e) {
                log.error("Failed to send exchange: " + me + " internal JMS Network", e);
                throw new MessagingException(e);
            }
        } else {
            throw new MessagingException("No component with id (" + id + ") - Couldn't route MessageExchange " + me);
        }
    }
View Full Code Here

                Document document = transformer.createDocument();
                getXStream().marshal(body, new DomWriter(document));
                message.setContent(new DOMSource(document));
            }
            catch (ParserConfigurationException e) {
                throw new MessagingException("Failed to marshal: " + body + " to DOM document: " + e, e);
            }
        }
        else {
            String xml = getXStream().toXML(body);
            message.setContent(new StringSource(xml));
View Full Code Here

TOP

Related Classes of javax.jbi.messaging.MessagingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.