Unprotected entry threads for background transactions
Unprotected entry threads are defined with the following
DB2ENTRY parameters: PROTECTNUM(0)
, THREADLIMIT(0)
, and THREADWAIT(POOL)
.
Unprotected entry threads are recommended for low volume transactions that do not require a fast response time. All transactions are forced to use pool threads.
Unprotected entry threads for background transactions are created,
used, and terminated as follows:
- TCB attach
- No subtask thread TCB is ever attached for this thread definition because THREADLIMIT=0. A pool thread TCB (or, in the open transaction environment, an open TCB) is used. All activity related to this entry definition is forced to a thread and a TCB in the pool. A transaction is then under the control of the PRIORITY, THREADLIMIT, and THREADWAIT parameters for the pool. The transaction keeps the PLAN and the AUTHID/AUTHTYPE values you specified for the entry thread.
- Thread creation
- A thread is created in the pool when needed by a transaction unless the THREADLIMIT value for the pool was reached.
- Thread termination
- The thread is terminated when it is released, unless it has a transaction queued for it.
- Thread reuse
- Other transactions using the same plan can reuse the thread, when it becomes available.