Possible Duplicate:
Catching java.lang.OutOfMemoryError
OutOfMemoryError are:
Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector
Java says:
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions.
This feels like hearing:
If you are drowning, be reasonable: you should not try to swim upwards to keep your head above water. Death is typically resulting from abnormal conditions.
Let's imagine a scenario where one is running a service. For some reason, another application on the same server is eating a lot of memory, causing an unexpected OOM in your service. Is it such a bad idea to try to reduce this service's memory consumption in order to remain available to user?
Or is there something more fundamental happening at the JVM level preventing the implementation of such a solution after the OOM has been thrown?