This is one of Tom's observations when he studied the 3.1 deployment profile:
There are 2 threads that are created for each loop, and they are only used for
a single operation. Many of these threads are running the
ReadableArchiveScannerAdapter class within a FutureTask. I see that
ReadableArchiveScannerAdapter is used by the
ApplicationLifecycle.getDeployableTypes method which is called by
ApplicationLifecycle.deploy. The getDeployableTypes method calls an HK2 Parser
class that uses a fixed thread pool of size 1 to parse the WAR file. After it
is done parsing, it shutdown the the thread pool. So this explains why at
least one thread is only used once. I'm not sure what the other thread is for.
Also, since the getDeployableTypes has the following:
I'm not sure why a separate thread pool is even necessary for this.
There were some follow up discussions on this between Tom, Jerome and Scott in
the email thread. I am filing this issue to track it.
I will work with Jerome to discuss how to better utilize thread pool/thread in