Sous-processus Arbortext PE Allocation
There are several ways to allocate an Sous-processus Arbortext PE. The most common way to allocate an Sous-processus Arbortext PE follows:
1. A dynamic component makes a call to the com.arbortext.e3.E3RequestContext.allocateE3Subprocess method; the call takes the HTTP request as a parameter. The allocateE3Subprocess method queries every configured Sous-processus Arbortext PE pool, calling each pool's com.arbortext.e3.E3SubprocessPool.testRequest method. The testRequest determines whether the Sous-processus Arbortext PE in that pool are supposed to handle requests like the one specified in the HTTP request.
If the response is true, the subprocess pool attempts to allocate an Sous-processus Arbortext PE to service the request according to the next steps.
If the answer is false, allocateE3Subprocess continues to query the next Sous-processus Arbortext PE pool in the list.
2. If a true response is returned for testRequest, then allocateE3Subprocess calls the Sous-processus Arbortext PE pool's allocate method. The allocate method eventually either returns an Sous-processus Arbortext PE object or throws an exception after processing the following:
a. The Sous-processus Arbortext PE pool begins the allocation process by checking for any idle Sous-processus Arbortext PE. If so, the one idle for the shortest time is allocated. If not, the Sous-processus Arbortext PE pool checks whether the configured maximum number of Sous-processus Arbortext PE are running. If not, it starts a new one and, when it is ready to accept requests, returns the Sous-processus Arbortext PE object.
b. If all Sous-processus Arbortext PE in the pool are busy and the pool is configured to cascade to another pool, allocate returns the result of the cascaded pool's allocate method.
c. If all Sous-processus Arbortext PE in a pool (and its cascaded pools) are busy and no additional ones can be started, the allocate method waits until either an Sous-processus Arbortext PE is no longer busy or the waiting period expires (explained in The maxSubprocessWait Attribute). If an Sous-processus Arbortext PE is freed during the waiting period, allocate returns its object.
3. If, after this processing, no Sous-processus Arbortext PE are found, allocate throws an exception and transmits an All Sous-processus Arbortext PE are currently busy error.
Sous-processus Arbortext PE are allocated to process queued transactions by the Queued Transaction Scheduler.
1. The Queued Transaction Scheduler begins by asking an Sous-processus Arbortext PE pool for an idle Sous-processus Arbortext PE. The Sous-processus Arbortext PE pool may start a new Sous-processus Arbortext PE if there are fewer than the maximum set by the maxSubprocesses parameter (see The minSubprocesses and maxSubprocesses Attributes). However, the scheduler will not wait for a Sous-processus Arbortext PE to become free if the maximum number of Sous-processus Arbortext PE are running and none are idle.
2. When the Queued Transaction Scheduler starts the execution of a queued transaction, it associates the allocated Sous-processus Arbortext PE with the transaction, so that any request to allocate a Sous-processus Arbortext PE by the queued transaction is satisfied by the transaction that was just allocated. Any attempts to acquire an Sous-processus Arbortext PE by a queued transaction are ignored. The allocated Sous-processus Arbortext PE is released by the Queued Transaction Scheduler after the queued transaction finishes executing.
An alternate way to allocate an Sous-processus Arbortext PE to an immediate request is by using any dynamic component running in the Arbortext PE Request Manager to allocate an Sous-processus Arbortext PE by querying the list of configured pools directly. The dynamic component can call the pool's allocate method, which bypasses the check for whether a pool should process a particular request. Use this approach with caution.
Est-ce que cela a été utile ?