public WorkflowStarterClient(ListableBeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
public void invokeOrderServices(int orderId, int nrOfCalls) throws RpException{
StopWatch stopWatch = new StopWatch(nrOfCalls + " OrderService call(s)");
Map orderServices = this.beanFactory.getBeansOfType(JaxRpcWorkflowStarter.class);
for (Iterator it = orderServices.keySet().iterator(); it.hasNext();) {
String beanName = (String) it.next();
JaxRpcWorkflowStarter orderService = (JaxRpcWorkflowStarter) orderServices.get(beanName);
System.out.println("Calling OrderService '" + beanName + "' with order ID " + orderId);
stopWatch.start(beanName);
String order = null;
for (int i = 0; i < nrOfCalls; i++) {
//order = orderService.startWorkflow();
}
stopWatch.stop();
if (order != null) {
log.debug("Return Value:"+order);
}
else {
System.out.println("Order with ID " + orderId + " not found");
}
System.out.println();
}
System.out.println(stopWatch.prettyPrint());
}