My concerning is to limit the memory usage for different web applications under one Jetty container. Every one knows that the total memory resource for one JVM is limited. If I want to run more than one applications in one Jetty container, the worst case is that one application consumes too many memory resource and does not release them in time so the other ones may encounter OOM exception. How can I limite the memory usage for every application under the Jetty container to prevent such exception?

Or if can I know the memory usage for every one under such case?