aspose file tools*
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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Connections left open after exception" Watch "Connections left open after exception" New topic
Author

Connections left open after exception

Will Myers
Ranch Hand

Joined: Aug 05, 2009
Posts: 331

Hi,
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?
Thanks
Willy
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
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
 
Consider Paul's rocket mass heater.
 
subject: Connections left open after exception