boolean isClosed() throws SQLException
Retrieves whether this
Connection object has been closed. A connection is closed if the method close has been called on it or if certain fatal errors have occurred. This method is guaranteed to return true only when it is called after the method
Connection.close has been called.
This method generally cannot be called to determine whether a connection to a database is valid or invalid. A typical client can determine that a connection is invalid by catching any exceptions that might be thrown when an operation is attempted.
true if this Connection object is closed; false if it is still open
SQLException - if a database access error occurs
For more information, reference JDBC documentation for: Connection.isClosed()