Examples of deliverAsync()


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

      requestMessage.getBody().add(message);

      // Deliver the request message synchronously - timeout after 20
      // seconds...
      deliveryAdapter.deliverAsync(requestMessage);
   }
  
   public static void main(String args[]) throws Exception
   {
      SendEsbMessage sm = new SendEsbMessage();
View Full Code Here

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

            for (URI key : messageMap.keySet()) {
                ms.removeMessage(key, MessageStore.CLASSIFICATION_RDLVR);
            }
            Service noneExistingService = new Service("none-exising-category", "none-existing-service-name");
            ServiceInvoker si = new ServiceInvoker(noneExistingService);
            si.deliverAsync(message);
          
            //Adding this control code to show where the message now is.
            Map<URI, Message> rdlvrMessageMap = ms.getAllMessages(MessageStore.CLASSIFICATION_RDLVR);
            while (rdlvrMessageMap.size() == 0) { //we may have to wait for the DLQService to act.
                logger.info("...Waiting for the DLQ Service to act.");
View Full Code Here

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

                message.getHeader().getCall().setFrom(new LogicalEPR("A", "B"));
                Message faultMessage = Factory.createErrorMessage(Factory.UNEXPECTED_ERROR, message, exception);

                // Should not get a MessageDeliverException...
                invoker.deliverAsync(faultMessage);

                // Mock action should have received faultMessage...
                waitForMockSet(faultMessage);
                assertTrue("Message equality", checkMessageEquality(faultMessage, MockAction.message));
            }
View Full Code Here

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

                    ResponseAction.responseMessage = MessageFactory.getInstance().getMessage();

                    request.getBody().add("Hello");

                    // Need to deliver async here because we're in a transaction (mock transaction)...
                    invoker.deliverAsync(request);
                    ResponseAction.waitForMessage(10000);
                } finally {
                    TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
                }
View Full Code Here

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

                    ResponseAction.responseMessage = MessageFactory.getInstance().getMessage();

                    request.getBody().add("Hello");

                    // Need to deliver async here because we're in a transaction (mock transaction)...
                    invoker.deliverAsync(request);
                    ResponseAction.waitForMessage(10000);
                } finally {
                    TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
                }
View Full Code Here

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

                //if exceeds the maxcount then update the classification to DLQ.
                Service to = (Service) message.getProperties().getProperty(ServiceInvoker.DELIVER_TO);
                try {
                    ServiceInvoker si = new ServiceInvoker(to.getCategory(), to.getName());
                    message.getProperties().setProperty(RedeliverStore.IS_REDELIVERY, true);
                    si.deliverAsync(message);
                    isDelivered=true;
                } catch (MessageDeliverException e) {
                    logger.debug(e.getMessage(), e);
                }
               
View Full Code Here

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

            TestCase.fail("Action not configured properly - 'target' service property must be in format 'category:name'.");
        }

        try {
            ServiceInvoker invoker = new ServiceInvoker(targetTokens[0], targetTokens[1]);
            invoker.deliverAsync(message);
        } catch (MessageDeliverException e) {
            TestCase.fail("Failed to create ServiceInvoker: " + e.getMessage());
        }

        messages.add(addition);
View Full Code Here

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

        esbMessage.getBody().add(message);
       
        ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
       
        try {
            invoker.deliverAsync(esbMessage);
        }catch(Exception ex) {
           ex.printStackTrace();
        }
        System.exit(0);
    }
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.