Asynchronous tasks in JSF applications

This is an example on how to implement concurrency in JSF applications using the Executor framework.

We used, in our example below, java.util.concurrent.ThreadPoolExecutor as a static instance that is created and destroyed from the init and destroy events listened to by javax.servlet.ServletContextListener of our application. ThreadPoolExecutor execute threads from a queue of Runnable or java.util.concurrent.Callable using an unbounded java.util.concurrent.LinkedBlockingQueue that holds the tasks submitted by clients for execution.