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.
Created attachment 28620 [details] Pool Cleaner name
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.
Filip, partially agreed but why can't we still have a better name? What about "Tomcat JDBC Pool Cleaner[<number>:<number>]"
Reopen, put in a more descriptive name
Fixed in r1616639
Finally, thanks!