ConnectionPool expectations?
I'm encountering a sporadic "Connection has already been closed" SQL Exception when trying to do something with a Connection supplied from a Weblogic 8.1 connection pool.
I haven't been able to find any place where we are trying to use the connection after close(), or where multiple threads might have access to it.
We do access the DataSource that uses the Connection Pool through our own code that provides a getReadOnlyConnection() that calls setReadOnly(true) on the connection before returning it, and another method that calls setAutoCommit(false).
We don't reset the state of the Connection before calling close on it. My question is whether or not this should/could be causing problems.
I can't find any documentation that indicates that a ConnectionPool should supply Connections in any particular state ( or whether it is our responsibility ).
I've also been unable to write any unit-ish test that would show the behaviour of either the Weblogic or the apache dbcp pool.
I'd appreciate any suggestions, especially on a diagnostic test.

