From: Bill H. <bi...@lo...> - 2004-03-18 23:08:01
|
Bertrand, On Thu, 2004-03-18 at 22:13, Bertrand Renuart wrote: > ==> A quick solution might be to change the code so the returned proxy > implements *all* interfaces implemented by the *real* connection. Do you know, I think that might just work... > BUT (as usual there is a but) - this may not be safe in all cases... > The OracleConnection above provides extra methods to return resources > bind to the connection - a CallableStatement or PreparedStatement for > example. Proxool will not be aware of this resource and won't be able > to release them as it already do for PreparedStatement/ResultSet > returned through the standard java.sql.Connection interface. I'm not sure that will be a problem. We recognise that a statement has been requested, not from the full signature, but from the return type only. We invoke the method on the connection and if the return type is a statement (or a subclass of statement) then we remember it. > This vendor extended interface may - possibly - also give other ways > to close the connection - which would break everything :( You mean like overriding close() with close(int somethingOrOther)? Yep, that would be awkward. I think we could ask for our users to call the main close method, couldn't we? > Don't see any easy solution right now... > What do you think ? I think it's worth investigating. Should be pretty quick to do a test and see whether it works. I think you're going to need a JDBC driver and a database (like Oracle) that displays this behaviour. If nobody else can do it any quicker I could try that out on Tuesday. > BTW: saw this issue by looking at the C3P0 bug list ;) > (http://sourceforge.net/tracker/index.php?func=detail&aid=918628&group_id=25357&atid=383693) You have your finger on the pulse, Bertrand :) - Bill |