Package org.jboss.soa.esb.client

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverAsync()


    external.setDate(date);
    requestMessage.getBody().add(external);

    // Deliver the request message synchronously - timeout after 20
    // seconds...
    deliveryAdapter.deliverAsync(requestMessage);
  }

  public static void main(String args[]) throws Exception {
    SendEsbMessage sm = new SendEsbMessage();
    sm.sendMessage(args[0]);
View Full Code Here


      {
        payloadProxy.setPayload(msg_in, object);
        ServiceInvoker invoker = new ServiceInvoker(service);
        if (async)
        {
          invoker.deliverAsync(msg_in);
        }
        else
        {
          invoker.deliverSync(msg_in, timeout);
        }
View Full Code Here

            }
           
           
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
View Full Code Here

            } else {
                throw new ConfigurationException("No EPR present in process instance") ;
            }
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
View Full Code Here

      Message requestMessage = MessageFactory.getInstance().getMessage(
            MessageType.JAVA_SERIALIZED);
     
      // Deliver the request message synchronously - timeout after 20
      // seconds...
      deliveryAdapter.deliverAsync(requestMessage);

      // need to cleanup connection pool for service invoker
      //deliveryAdapter.close();
   }
View Full Code Here

      ServiceInvoker invoker = new ServiceInvoker(category,serviceName);
      Message requestMessage;
      requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
      requestMessage.getBody().add(msgText);
     try {    
        invoker.deliverAsync(requestMessage); // no waiting for a response
        } catch (Exception e) {
            System.out.println("Exception caught by client: " + e);
        }
    }
   
View Full Code Here

    try
    {
      final ServiceInvoker serviceInvoker = new ServiceInvoker(ServiceInvoker.dlqService) ;

      serviceInvoker.deliverAsync(message) ;
    }
    catch (final MessageDeliverException mde)
    {
      LOGGER.warn("Failed to send response failure to DLQ service") ;
      LOGGER.debug("Failed to send response failure to DLQ service", mde) ;
View Full Code Here

    private void messageTo(EPR epr, Message message, MessageType messageType) {
        if(epr instanceof LogicalEPR) {
            try {
                ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } catch (MessageDeliverException e) {
                LOGGER.error("Failed to send " + messageType + " to address " + epr
                        + " for message "+message.getHeader(), e);
            }
        } else {
View Full Code Here

  public void process(Exchange exchange) throws Exception {
    org.apache.camel.Message camelMessageIn = exchange.getIn();
    Message esbMessageIn = getComposer().compose(camelMessageIn);
    ServiceInvoker invoker = new ServiceInvoker(service);
    if (async) {
      invoker.deliverAsync(esbMessageIn);
    }
    else {
      Message esbMessageOut = invoker.deliverSync(esbMessageIn, timeout);
      org.apache.camel.Message camelMessageOut = getComposer().decompose(esbMessageOut, camelMessageIn);
      exchange.setOut(camelMessageOut);
View Full Code Here

        try
        {
            Message message = MessageFactory.getInstance().getMessage();
            message.getBody().add("Sample payload");
            ServiceInvoker invoker = new ServiceInvoker("FirstServiceESB", "SimpleListener");
            invoker.deliverAsync(message);
        }
        catch (final MessageDeliverException e)
        {
            e.printStackTrace();
        }
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.