Use the create-threadpool subcommand in remote mode to create a thread pool.
The minimum thread pool size that is specified signals the server to allocate at least that many threads in reserve for application requests. That number is increased up to the maximum thread pool size that is specified. Increasing the number of threads available to a process allows the process to respond to more application requests simultaneously.
If one resource adapter or application occupies all the GlassFish Server threads, thread starvation might occur. You can avoid this by dividing the GlassFish Server threads into different thread pools.
Ensure that the server is running.
Remote subcommands require a running server.
Create a new thread pool by using the create-threadpool(1) subcommand.
Information about options for the subcommand is included in this help page.
To apply your changes, restart GlassFish Server.
See To Restart a Domain.
Restart is not necessary for thread pools used by the web container.
This example creates threadpool-l.
asadmin> create-threadpool --maxthreadpoolsize 100 --minthreadpoolsize 20 --idletimeout 2 --workqueues 100 threadpool-1 Command create-threadpool executed successfully
You can also view the full syntax and options of the subcommand by typing asadmin help create-threadpool at the command line.