question: private static void shutDownMySQLAbandonedConnectionCleanupThread ( ClassLoader classLoader ) { try { Class < ? > mysqlCleanupThreadClass ; try { mysqlCleanupThreadClass = classLoader . loadClass ( "com.mysql.jdbc.AbandonedConnectionCleanupThread" ) ; } catch ( ClassNotFoundException e ) { LOG . trace ( "Failed to load MySQL abandoned connection cleanup thread class. Presuming DB App is " + "not being run with MySQL and ignoring" , e ) ; return ; } Method shutdownMethod = mysqlCleanupThreadClass . getMethod ( "shutdown" ) ; shutdownMethod . invoke ( null ) ; LOG . debug ( "Successfully shutdown MySQL connection cleanup thread." ) ; } catch ( Throwable e ) { LOG . warn ( "Failed to shutdown MySQL connection cleanup thread. Ignoring." , e ) ; } }
target:  Shuts down a cleanup thread com.mysql.jdbc.AbandonedConnectionCleanupThread that mysql driver fails to destroy If this is not done, the thread keeps a reference to the classloader, thereby causing OOMs or too many open files