> Slide's connectIfNeeded method didn't work, so i did check.  Here is
> what the spec says at
>
http://java.sun.com/products/jdk/1.2/docs/guide/jdbc/spec2/jdbc2.0.frame11.h
tml
>
> "11 Clarifications
> We have gotten several requests to clarify some aspects of the JDBC API.
> This chapter contains additional explanation of some JDBC features.
>
> 11.1     Connection.isClosed()
> The Connection.isClosed() method is only guaranteed to return true after
> Connection.closed() has been called. Connection.isClosed() cannot be
> called, in general, to determine if a database connection is valid or
> invalid. A typical JDBC client can determine that a connection is
> invalid by catching the exception that is thrown when a JDBC operation
> is attempted."
>
> This also affects the semantics of our isConnected() method.

Ok, so it's indeed broken. The thing is that there's no way to know if the
JDBC exception you get indicates that the connection is broken, that the SQL
is bad, or something else :-(

Remy


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to