I'm having an issue where JBoss is leaving connections open after an OutOfMemoryError is thrown, it seems the finally block in the code is not being called when this happens. Is there a setting somewhere that will fix this?
Kees Jan Koster
posted 5 years ago
Finally is being called, don't worry. You may be doing too much stuff in finally, or maybe you have a constructor that fails and leaves an object in a state that it cannot be collected properly.
Why are you seeing OOME's anyway? Resolve these first.