#79 throw in ConnectionCustomizer::onCheckOut is bad

open
nobody
None
5
2010-01-08
2010-01-08
No

The ConnectionCustomizer interface for onCheckOut throw Exception. However, checkoutResource at BasicResourcePool.java line 474 has the comment "This function recursively calls itself... under nonpathological situations, it shouldn't be a problem, but if resources can never successfully check out for some reason, we might blow the stack..." In other words, throwing an exception in ConnectionCustomizer.onCheckOut will cause StackOverflowError. I suggest removing "throw Exception" from the ConnectionCustomizer interface or coping with exceptions in BasicResourcePool more gracefully.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks