[Opensource] java.sql.Connection - Revised
Michael Rimov
rimovm at centercomp.com
Fri Jun 28 21:08:29 PDT 2002
At 12:03 PM 6/28/2002 -0400, you wrote:
>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 :-)
Sure thing, with the javadoc'ed catch though that if you DO get the
connection, all bets are off that the ConnectionPool will be working
properly when you're done with it. That's why I've been avoiding it until
now :)
Thanks for the feedback!
-Mike
More information about the Opensource
mailing list