Package javax.jbi.messaging

Examples of javax.jbi.messaging.DeliveryChannel.send()


        nm.setContent(new StringSource("<request/>"));
        me.setInMessage(nm);
        channel.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        me.setStatus(ExchangeStatus.DONE);
        channel.send(me);

        if (!done.get()) {
            synchronized (done) {
                done.wait(5000);
            }
View Full Code Here


            } else {
                assertTrue(after - before < 4000);
            }
            assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
            me.setStatus(ExchangeStatus.DONE);
            channel.send(me);
            t.join();
        }
    }
   
    private MessageExchangeImpl createMessageExchange(final DeliveryChannelImpl channel) throws MessagingException {
View Full Code Here

            exchange.setInMessage(message);

            message.setProperty("id", new Integer(i));
            message.setContent(new StringSource("<example id='" + i + "'/>"));

            deliveryChannel.send(exchange);
        }
    }

    // ComponentLifeCycle interface
    //-------------------------------------------------------------------------
View Full Code Here

          MimeMessage mailMsg = (MimeMessage) folder.getMessage(i);
          InOnly io = mef.createInOnlyExchange();
          NormalizedMessage normalizedMessage = io.createMessage();
          this.marshaler.prepareExchange(io,normalizedMessage,mailMsg);
          io.setInMessage(normalizedMessage);
          channel.send(io);
            mailMsg.setFlag(Flags.Flag.DELETED,true);
        }
    } finally {
      try {
        if (folder != null) {
View Full Code Here

                Fault f = me.getFault();
                Fault of = exchange.createFault();
                exchange.setFault(of);
                getMessageTransformer().transform(exchange, f, of);
            }
            channel.send(exchange);
            done(me);
        }
       
    }
View Full Code Here

                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                LOG.info("sync send on deliverychannel: " + deliveryChannel);
                if (sync) {
                    deliveryChannel.sendSync(exchange);
                } else {
                    deliveryChannel.send(exchange);
                }
            }
        } else {
            LOG.warn("No endpoints available for interface: " + interfaceName);
        }
View Full Code Here

        MessageExchangeFactory outputFactory = deliveryChannel.createExchangeFactory(outputEndpoint);
        InOnly inOnly = outputFactory.createInOnlyExchange();

        if (answer) {
            inOnly.setInMessage(rpc.getOutMessage());
            deliveryChannel.send(inOnly);
            done(exchange);
        } else if (!(exchange instanceof InOnly)) {
            inOnly.setError(rpc.getError());
            Fault fault = rpc.getFault();
            fail(exchange, fault);
View Full Code Here

                        me.setStatus(ExchangeStatus.DONE);
                    } catch (Exception e) {
                        me.setError(e);
                        throw new ActionSystemException(e);
                    } finally {
                        channel.send(me);
                    }
                    Element e = fault.getDocumentElement();
                    // Try to determine fault name
                    String faultName = e.getLocalName();
                    String partName = BPEComponent.PART_PAYLOAD;
View Full Code Here

                        me.setStatus(ExchangeStatus.DONE);
                    } catch (Exception e) {
                        me.setError(e);
                        throw new ActionSystemException(e);
                    } finally {
                        channel.send(me);
                    }
                }
            } else if (me.getStatus() == ExchangeStatus.ERROR) {
                // Extract error
                Exception error = me.getError();
View Full Code Here

              me.setProperty(name, exchange.getProperty(name));
          }
          if (Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC))) {
              channel.sendSync(me);
          } else {
              channel.send(me);
          }
      }
    }

  public String getFlowName() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.