there's a feature in servlet 3.0 specification which "allows the thread to issue a call to the resource and return back to the container without getting blocked. The thread can perform other tasks, which makes Servlet 3.0's performance more efficient. Implementing an Asynchronous Servlet requires using the AsyncContext, which can be obtainer from the HTTP request object."
there is an example using java under section "Aysnchronous Servlets" here: http://www.mastertheboss.com/servlet-30/servlet-30-tutorial
here is an example of the lift framework implementation:
here is the implementation:
java EE AsyncContext documentation:
an example for jboss: