JdbcLeakPrevention (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.catalina.loader, class: JdbcLeakPrevention

# Class JdbcLeakPrevention

java.lang.Object
org.apache.catalina.loader.JdbcLeakPrevention

public class JdbcLeakPrevention extends Object
This class is loaded by `WebappClassLoaderBase` to enable it to deregister JDBC drivers forgotten by the web application. There are some classloading hacks involved - see `WebappClassLoaderBase.clearReferences()` for details - but the short version is do not just create a new instance of this class with the new keyword. Since this class is loaded by `WebappClassLoaderBase`, it cannot refer to any internal Tomcat classes as that will cause the security manager to complain.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JdbcLeakPrevention()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<String>`
  `clearJdbcDriverRegistrations()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JdbcLeakPrevention

    public JdbcLeakPrevention()

- ## Method Details

  - ### clearJdbcDriverRegistrations

    public List<String> clearJdbcDriverRegistrations() throws SQLException
    Throws:
      `SQLException`