immutant/immutant — comment on commit 14fc4d6ba43d5298e9350e7fa8beeaadb7b5895e
File:  line 0
By jcrossley:

This is a clever solution. I worry that the pools are unbounded and unconfigurable, but I guess each app's pool can never grow larger than JBoss' own pool, which is configurable, huh?

Another option is to use reflection (which we're already doing) to clear the ThreadLocals before returning from call() and hence returning the JBoss thread to the pool, but I'm not sure if that would be more performant or not. See http://weblogs.java.net/blog/jjviana/archive/2010/06/10/threadlocal-thread-pool-bad-idea-or-dealing-apparent-glassfish-memor