Bug 53088 - Give PoolCleaner TimerTask a better name
Summary: Give PoolCleaner TimerTask a better name
Alias: None
Product: Tomcat Modules
Classification: Unclassified
Component: jdbc-pool (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2012-04-17 07:30 UTC by Michael Osipov
Modified: 2014-08-08 08:33 UTC (History)
0 users

Pool Cleaner name (938 bytes, patch)
2012-04-17 07:31 UTC, Michael Osipov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2012-04-17 07:30:25 UTC
Currently, the TimerTask has the thread name "PoolCleaner[<number>:<number>]". This is not really helpful (I was not able to identify this therad with VisualVM at first glance) and can be messed with Oracle JNDI PoolCleaner.

A clearer name would help a lot. Since this thread is a singleton, I do not seed any need to display classloader id and startup time. I have attached a patched against with a proposal for a better name.
Comment 1 Michael Osipov 2012-04-17 07:31:02 UTC
Created attachment 28620 [details]
Pool Cleaner name
Comment 2 Filip Hanik 2012-04-23 13:57:51 UTC
I am marking this invalid since
1. Singleton is only a relative term to a classloader. An app that embeds this library can start up two different pools in two different classloaders
2. The thread, even in a single class loader system can change names - since the timer thread, while being a singleton, can be stopped, and then started as pools start and stop throughout the runtime of the JVM.

The name currently helps identify what classloader started it, and what time it started.
Comment 3 Michael Osipov 2012-04-23 14:13:09 UTC

partially agreed but why can't we still have a better name?
What about "Tomcat JDBC Pool Cleaner[<number>:<number>]"
Comment 4 Filip Hanik 2012-04-23 14:27:54 UTC
Reopen, put in a more descriptive name
Comment 5 Filip Hanik 2014-08-07 23:52:12 UTC
Fixed in r1616639
Comment 6 Michael Osipov 2014-08-08 08:33:46 UTC
Finally, thanks!