Package org.springframework.samples.jpetstore.domain.logic

Examples of org.springframework.samples.jpetstore.domain.logic.OrderService


  public void invokeOrderServices(int orderId, int nrOfCalls) {
    StopWatch stopWatch = new StopWatch(nrOfCalls + " OrderService call(s)");
    Map orderServices = this.beanFactory.getBeansOfType(OrderService.class);
    for (Iterator it = orderServices.keySet().iterator(); it.hasNext();) {
      String beanName = (String) it.next();
      OrderService orderService = (OrderService) orderServices.get(beanName);
      System.out.println("Calling OrderService '" + beanName + "' with order ID " + orderId);
      stopWatch.start(beanName);
      Order order = null;
      for (int i = 0; i < nrOfCalls; i++) {
        order = orderService.getOrder(orderId);
      }
      stopWatch.stop();
      if (order != null) {
        printOrder(order);
      }
View Full Code Here

TOP

Related Classes of org.springframework.samples.jpetstore.domain.logic.OrderService

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.