System.out.printf("Sample02AsyncServlet::The current thread is '%s'\n", Thread.currentThread().getName());
// Pass in async mode
AsyncContext aCtx = req.startAsync();
aCtx.setTimeout(25000);// Timeout setted to 25 seconds
// Add a async events listener
aCtx.addListener(new Sample02AsyncListener());
// Launch async processing using a dedicated thread
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
executor.execute(new RequestProcessor(aCtx));
// Never forget to close the executor in order to release all thread
// objects link in memory...