Servlet 3.0 supports asynchronous responses, if that is what you need.
Actually if you are using Spring MVC (3.2), you can now return 'Callable' instances from your controller methods and the framework will handle the asynchronous processing of the request and call you back when it's done.
There is also a DeferredResult return type which lets you manage your own threading mechanism. It's all pretty handy for handling complex requests because it means the container can 'park' the request thread and use it for something else while it is waiting for your long running process to finish.
On Wed, Mar 6, 2013 at 11:27 PM, Jon Hatfield <[address removed]>
I have heard many times "do not create threads in a web app", since the container should manage them. However, the more modern APIs such as ExectorService appear to be used in web apps by some people. Can you use such java.util.concurrent classes in a wep app that requires multi-threading (e.g. due to high load), or do you forward data to a stand alone app that deals with the multi-threading? I can't find a definite answer on the internet.
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jon Hatfield ([address removed]) from LJC - London Java Community.
To learn more about Jon Hatfield, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages
Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]