This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 365

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:
subject: Connections left open after exception
It's not a secret anymore!