blob: 2f906f156926d2e7cc1afabaa4193827cb2fb58c [file] [log] [blame]
type=page
status=published
title=create-threadpool
next=create-transport.html
prev=create-system-properties.html
~~~~~~
= create-threadpool
[[create-threadpool-1]][[GSRFM00060]][[create-threadpool]]
== create-threadpool
Adds a thread pool
[[sthref553]]
=== Synopsis
[source]
----
asadmin [asadmin-options] create-threadpool [--help]
[--target target]
[--maxthreadpoolsize maxthreadpoolsize]
[--minthreadpoolsize minthreadpoolsize]
[--idletimeout idletimeout] [--maxqueuesize maxqueuesize]
[--workqueues workqueues] threadpool-id
----
[[sthref554]]
=== Description
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.
[[sthref555]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--target`::
This option specifies the target on which you are creating the thread pool.
Valid values are as follows:
`server`;;
Creates the thread pool for the default {productName} 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.
`--maxthreadpoolsize`::
Specifies the maximum number of threads the pool can contain. Default is 5.
`--minthreadpoolsize`::
Specifies the minimum number of threads in the pool. These are created
when the thread pool is instantiated. Default is 2.
`--idletimeout`::
Specifies the amount of time in seconds after which idle threads are
removed from the pool. Default is 900.
`--maxqueuesize`::
Specifies the maximum number of messages that can be queued until
threads are available to process them for a network listener or IIOP
listener. A value of -1 specifies no limit. Default is 4096.
`--workqueues`::
Do not specify this option. This option is retained for compatibility
with earlier releases. If you specify this option, a syntax error does
not occur. Instead, the subcommand runs successfully and displays a
warning message that the option is ignored.
[[sthref556]]
=== Operands
threadpool-id::
An ID for the work queue, for example, `threadpool-1`.
[[sthref557]]
=== Examples
[[GSRFM527]][[sthref558]]
==== Example 1   Creating a Thread Pool
This command creates a new thread pool called `threadpool-l`.
[source]
----
asadmin> create-threadpool --maxthreadpoolsize 100
--minthreadpoolsize 20 --idletimeout 2 threadpool-1
Command create-threadpool executed successfully
----
[[sthref559]]
=== Exit Status
0::
subcommand executed successfully
1::
error in executing the subcommand
[[sthref560]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:delete-threadpool.html#delete-threadpool-1[`delete-threadpool`(1)],
link:list-threadpools.html#list-threadpools-1[`list-threadpools`(1)]