I am (successfully) connecting to a database using the following:
java.sql.Connection connect = DriverManager.getConnection(
\"jdbc:mysql://localhost/some_
Use Connection.isClosed() function.
The JavaDoc states:
Retrieves whether this
Connectionobject 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 returntrueonly when it is called after the method Connection.close has been called.