src/share/classes/java/sql/Driver.java
Print this page
@@ -172,6 +172,27 @@
* @return the parent Logger for this driver
* @throws SQLFeatureNotSupportedException if the driver does not use <code>java.util.logging<code>.
* @since 1.7
*/
public Logger getParentLogger() throws SQLFeatureNotSupportedException;
+
+ //------------------------- JDBC 4.2 -----------------------------------
+
+ /**
+ * Releases any resources that the driver may hold. This method is called by
+ * {@linkplain DriverManager#deregisterDriver}
+ * <p>
+ * The default implementation will be a no-op
+ * <p>
+ * If a security manager exists and its {@code checkPermission} denies
+ * permission, then a {@code SecurityException} will be thrown.
+ * @throws SecurityException if a security manager exists and its
+ * {@code checkPermission} method denies permission to deregister a driver.
+ *
+ * @see SecurityManager#checkPermission
+ * @see DriverManager#deregisterDriver
+ * @since 1.8
+ */
+ default void deregisterDriver() {
+ // Default method takes no action
+ }
}