jQuery in Action, 3rd edition
The moose likes JBoss/WildFly and the fly likes Connections left open after exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Connections left open after exception" Watch "Connections left open after exception" New topic

Connections left open after exception

Will Myers
Ranch Hand

Joined: Aug 05, 2009
Posts: 370

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
JavaMonitor Support

Joined: Mar 31, 2009
Posts: 251
Dear Will,

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.

Kees Jan

Java-monitor, JVM monitoring made easy <- right here on Java Ranch
I agree. Here's the link: http://aspose.com/file-tools
subject: Connections left open after exception
It's not a secret anymore!