I am working with a product built around jBoss AS. The server handles all UI interactions as well as some heavy weight tasks that may be requested by a user. These tasks may potentially consume a lot of the server resources including memory and CPU time. This increases system reposponse times and deteriorates uses experience. These tasks also may cause out of memory exceptions and kill the entire system.
In most cases these tasks include some database interaction and data processing. The executing code is implemented as session EJBs.
While handling high resource demands and exceptions is a separate issue, I am also looking for ways to isolate execution of these tasks from the rest of the system, may be running them in a separate JVM. I will be very interested to learn possible solutions that work well with jBoss.