[Opensource] java.sql.Connection - Revised
milend
milend at ansco.com
Fri Jun 28 09:03:36 PDT 2002
Hi,
Thank you Dinesh but this is not working for me. I am using a third
party package that requires a java.sql.Connection instance as a parameter.
You cannot cast DBConnection to java.sql.connection. For example that
package often calls
Connection.prepareStatement(..) something that misses from DBConnection.
Moreover provided that DBConnection uses the sql.connection internally
why there is no method
to give us an instance or even why not make DBConnection implement
Conncetion.
It will save a lot of hustle. If the possibility of someone invoking
close on a connection is
the impediment then simply override close to check some flag whether it
is legal to close a connection.
That flag could be set internally when needed.
Thank you
PS:
Lewis also had a similar problem. however it will be great if the
expresso guys consider including his method in the next release of Expresso.
public Connection getConnection() {if (myConnection == null) {return
null;}return myConnection;}
It is all about compatibility :-)
More information about the Opensource
mailing list