According to jdbc spec: "Calling the method close on a Connection object that is already closed is a no-op."
http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#close()
This simple code throws an error:
Class.forName("org.drizzle.jdbc.DrizzleDriver").newInstance();
Connection conn = null;
{
conn = DriverManager.getConnection("jdbc:mysql:thin://" + HOST + ":"
+ PORT + "/" + DB, USER, PASS);
}
conn.close();
conn.close();
Proposed fix in DrizzleConnection:
public void close() throws SQLException {
if (isClosed())
return;
...
Note: I was unable to tell whether the timeoutExecutor could be running while protocol.isClosed() is true. It might be worth trying to this.timeoutExecutor.shutdown(); in any case
According to jdbc spec: "Calling the method close on a Connection object that is already closed is a no-op."
http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#close()
This simple code throws an error:
Proposed fix in DrizzleConnection:
Note: I was unable to tell whether the
timeoutExecutorcould be running whileprotocol.isClosed()is true. It might be worth trying tothis.timeoutExecutor.shutdown();in any case