Transcript
  • 1. Copyright 2014 by Intertech, Inc.

2. Copyright 2014 by Intertech, Inc. 3. Copyright 2014 by Intertech, Inc. 4. Copyright 2014 by Intertech, Inc.public interface ShipService {Confirmation ship(Order order);} 5. ClassPathXmlApplicationContext context = newClassPathXmlApplicationContext("/META-INF/spring/si-components.xml");ShipService service = context.getBean("shipService", ShipService.class);Confirmation confirm = service.ship(myOrder);Copyright 2014 by Intertech, Inc. 6. Copyright 2014 by Intertech, Inc.public interface ShipService {Future ship(Order order);}ShipService service = context.getBean("shipService", ShipService.class);Future future = service.ship(myOrder);// other application work hereConfirmation confirm = future.get(5000, TimeUnit.SECONDS); 7. Copyright 2014 by Intertech, Inc. 8. Copyright 2014 by Intertech, Inc.


Recommended