M
Mark Rafn
This is mostly me whining, rather than asking for help. Sorry.
Why oh why would they change the java.sql.Connection interface in a
non-compatible way without even documenting the change?
I use a custom Connection class, which basically wraps the Connection I get
from my JDBC pool, but does logging of usage and gives diagnostics for
unclosed connections. It's a pretty trivial wrapper that just logs and
delegates to the real Connection.
But it doesn't compile under jdk1.6. There's about 10 new methods in
Connection, which I don't have implementations for. They're easy to add, but
then it doesn't compile under jdk1.5, as the methods don't exist in the
delegation object!
Grr! So now I'm back in the C world of conditional compilation - actually
using different source for different compilers. Or I'm dealing with ugly
Reflection code to work around methods that may or may not be missing.
Would it have been that much harder for Sun to have extended Connection rather
than just changing it in place?
Why oh why would they change the java.sql.Connection interface in a
non-compatible way without even documenting the change?
I use a custom Connection class, which basically wraps the Connection I get
from my JDBC pool, but does logging of usage and gives diagnostics for
unclosed connections. It's a pretty trivial wrapper that just logs and
delegates to the real Connection.
But it doesn't compile under jdk1.6. There's about 10 new methods in
Connection, which I don't have implementations for. They're easy to add, but
then it doesn't compile under jdk1.5, as the methods don't exist in the
delegation object!
Grr! So now I'm back in the C world of conditional compilation - actually
using different source for different compilers. Or I'm dealing with ugly
Reflection code to work around methods that may or may not be missing.
Would it have been that much harder for Sun to have extended Connection rather
than just changing it in place?