Bug #73876 | Connector/J's AbandonedConnectionCleanupThread still uses WebappClassLoader | ||
---|---|---|---|
Submitted: | 10 Sep 2014 14:54 | Modified: | 11 Sep 2014 7:39 |
Reporter: | Christopher Schultz | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.32 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | memory leak |
[10 Sep 2014 14:54]
Christopher Schultz
[10 Sep 2014 15:01]
Christopher Schultz
Here is a formal patch that implements my suggestion: --- src/com/mysql/jdbc/NonRegisteringDriver.java.orig 2014-09-10 10:55:31.000000000 -0400 +++ src/com/mysql/jdbc/NonRegisteringDriver.java 2014-09-10 10:59:44.000000000 -0400 @@ -112,9 +112,15 @@ static { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + try { + Thread.currentThread().setContextClassLoader(NonRegisteringDriver.class.getClassLoader()); AbandonedConnectionCleanupThread referenceThread = new AbandonedConnectionCleanupThread(); referenceThread.setDaemon(true); referenceThread.start(); + } finally { + Thread.currentThread().setContextClassLoader(cl); + } } /** * Key used to retreive the database value from the properties instance
[10 Sep 2014 19:11]
Christopher Schultz
Tweaked synopsis.
[11 Sep 2014 7:39]
Alexander Soklakov
Hi Christopher, Thanks for your comments. I mark this report as a duplicate of Bug#69526.