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);
}