[ 
https://issues.apache.org/jira/browse/POOL-242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14551972#comment-14551972
 ] 

Michael Osipov commented on POOL-242:
-------------------------------------

Based on the latest two comments, I'd like to add this:

I was not aware that the thread is classloader-bound and not JVM. This should 
be really clarified in the docs. Shall I spawn an issue for that? We have in a 
Spring app two pools set up. One keyed and one regular one. This app is 
deployed multiple times on the same Tomcat instance for several tenants. In 
this case, according to Mark Thomas, I'd see multiple threads with the same 
name.

I fully agree with Mark that configuration would suffer from race conditions. I 
would propose the following approaches:

1. One cannot set the name with a pool configurator becaue it makes no sense.
2. Provide a system property for that
3. Retrieve the name from JNDI

This selector approach is borrowed from Logback: 
http://logback.qos.ch/manual/loggingSeparation.html

This would cover: a) one classloader in the JVM, b) multiple classloaders in 
the JVM (e.g., servlet container).

> Set thread name for EvictionTimer
> ---------------------------------
>
>                 Key: POOL-242
>                 URL: https://issues.apache.org/jira/browse/POOL-242
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 1.5, 1.6, 2.0, 2.1, 2.2, 2.3
>            Reporter: Peter Plosz
>            Priority: Trivial
>             Fix For: 1.6.1, 1.5.8
>
>
> Setting up thread name for EvictionTimer makes life easier when debugging 
> issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to