Are you sure this is a good idea? You had to get the prepared statement and call setMaxRows on it, right? so why can't you call setMaxRows(0) when you are done? Is there some reason this doesn't work?
I don't agree.
For instance :
PrepareStatement ps1 = connection.prepareStatement();
PrepareStatement ps2 = connection.prepareStatement();
Without patching the PrepareStatementInPool.close method, ps2 result will be limited to 13 rows. It's an
amazing thing, isn't it ?
I don't think that doing a ps1.setMaxRows(0) before close, is a good way .
When we create a new prepareStatement, the new PS must be independant. This same code works on BEA WL.