I'm using the JDBC over a modem link and I regularly experience
SocketExceptions as a result of the flakey nature of the connection. The
driver can't be held responsible for unreliable sub-levels but the
Exception handling could be more clear.
Currently the driver prints out a stack trace of the original IOException
with unspecific descriptions and then throws a PSQLException. It's not
obvious where the stack trace comes from.
I know you're thinking "he's dumb enough to use a JDBC connection over a
modem link, of course this would confuse him". Still, the behavior could
be more informative. I've attached a patch that might improve that. You
can probably conceive a better phrasing.
Also, is there a standard way to decipher fatal and non-fatal errors
thrown by the driver? Would java.sql.Connection.isClosed() work?
Thanks,
Mike Adler