commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Handorf <>
Subject [Pool] GenericObjectPool borrowObject() method needs minor patch
Date Mon, 10 Nov 2003 05:11:25 GMT
Look at the borrowObject() code at the following link: 

specifically, the following lines of code caused me much grief:

831             try {
832                 _factory.activateObject(pair.value);
837             }
838             catch (Exception e) {
850                 if(newlyCreated) {
851                     throw new NoSuchElementException("Could not  
create a validated object");

When factory.activateObject() throws an Exception, it would be nice to  
know what the Exception is instead of having it caught and obscured  
with a less meaningful error message.

In my case, the JDBC driver was failing with a "does not support  
read-only mode" error.
If that error had been printed I could have solved this problem in 1  
minute instead of one day. I'm past it now but I thought I would pass  
this on in hopes that it will help somebody else.
Maybe one of the developers will read this post????
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message