}
private void doStatelessExample(ApplicationContext ctx, PrintWriter writer) {
// access the EJB proxy
EchoService service = (EchoService) ctx.getBean("echoService");
writer.write(service.echo("Foo"));
}
private void doStatefulExample(ApplicationContext ctx, PrintWriter writer,
HttpSession session) {
CounterService service = (CounterService) session