2.21.1 create-threadpool
Creates a thread pool with the specified name.
Synopsis
asadmin [asadmin-options] create-threadpool [--help] [--target target] [--maxthreadpoolsize maxthreadpoolsize] [--minthreadpoolsize minthreadpoolsize] [--idletimeout idletimeout] [--maxqueuesize maxqueuesize] threadpool-id
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The create-threadpool subcommand creates a thread pool with the specified name. You can specify maximum and minimum number of threads in the pool, the quantity of messages, and the idle timeout of a thread. The created thread pool can be used for servicing IIOP requests and for resource adapters to service work management requests. A thread pool can be used in multiple resource adapters. This subcommand is supported in remote mode only.
Precondition
DAS has to be in a running state.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --target target
-
Specifies the target on which you are creating the thread pool.
Type: String
The following values can be specified:
-
server
Creates the thread pool for the server instance "server" and is the default value.
-
configuration-name
Creates the thread pool for the named configuration.
-
cluster-name
Creates the thread pool for every instance in the cluster.
-
instance-name
Creates the thread pool for a particular instance.
Default value: server
-
- --maxthreadpoolsize maxthreadpoolsize
-
Specifies the maximum number of threads the pool can contain.
Type: Integer
The following values can be specified:
-
1 to 2147483647
Default value: 5
-
- --minthreadpoolsize minthreadpoolsize
-
Specifies the minimum number of threads in the pool.
Type: Integer
The following values can be specified:
-
1 to 2147483647
Default value: 2
-
- --idletimeout idletimeout
-
Specifies the amount of time in seconds after which idle threads are removed from the pool.
Type: Integer
The following values can be specified:
-
1to 2147483647
Default value: 900
-
- --maxqueuesize maxqueuesize
-
Specifies the maximum number of messages that can be queued until the threads are available to process them for a network listener or IIOP listener.
Type: Integer
The following values can be specified:
-
-1 and 1 to 2147483647
Default value: 4096
-
- threadpool-id
-
Specifies an ID for the work queue.
Type: String
The following values can be specified:
-
ID of thread pool
Default value: N/A
-
Examples
The following example creates a new thread pool called threadpool-l on the server instance instance1.
asadmin create-threadpool --target instance1 --maxthreadpoolsize 100 --minthreadpoolsize 20 --idletimeout 2 threadpool-1
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |