Details
Description
If you call getConnection() on the JDBC data source object you've configured in
your struts-config.xml you may get connections that have been closed (eg. due
timeouts). You wouldn't expect this from a pool. I added a check like
>>>>
if(connection.getConnection().isClosed()) {
connection = null;
useCount--;
activeCount--;
} else {
// unclose the connection's wrapper
connection.setClosed(false);
return connection;
}
<<<<
to the getConnection() method of the GenericDataSource class and it seems to
work well.