Arbortext PE Unterprozess Allocation
There are several ways to allocate an Arbortext PE Unterprozess. The most common way to allocate an Arbortext PE Unterprozess 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 Arbortext PE Unterprozess pool, calling each pool's com.arbortext.e3.E3SubprocessPool.testRequest method. The testRequest determines whether the Arbortext PE Unterprozesse 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 Arbortext PE Unterprozess to service the request according to the next steps.
If the answer is false, allocateE3Subprocess continues to query the next Arbortext PE Unterprozess pool in the list.
2. If a true response is returned for testRequest, then allocateE3Subprocess calls the Arbortext PE Unterprozess pool's allocate method. The allocate method eventually either returns an Arbortext PE Unterprozess object or throws an exception after processing the following:
a. The Arbortext PE Unterprozess pool begins the allocation process by checking for any idle Arbortext PE Unterprozesse. If so, the one idle for the shortest time is allocated. If not, the Arbortext PE Unterprozess pool checks whether the configured maximum number of Arbortext PE Unterprozesse are running. If not, it starts a new one and, when it is ready to accept requests, returns the Arbortext PE Unterprozess object.
b. If all Arbortext PE Unterprozesse 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 Arbortext PE Unterprozesse in a pool (and its cascaded pools) are busy and no additional ones can be started, the allocate method waits until either an Arbortext PE Unterprozess is no longer busy or the waiting period expires (explained in The maxSubprocessWait Attribute). If an Arbortext PE Unterprozess is freed during the waiting period, allocate returns its object.
3. If, after this processing, no Arbortext PE Unterprozesse are found, allocate throws an exception and transmits an All Arbortext PE Unterprozesse are currently busy error.
Arbortext PE Unterprozesse are allocated to process queued transactions by the Queued Transaction Scheduler.
1. The Queued Transaction Scheduler begins by asking an Arbortext PE Unterprozess pool for an idle Arbortext PE Unterprozess. The Arbortext PE Unterprozess pool may start a new Arbortext PE Unterprozess 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 Arbortext PE Unterprozess to become free if the maximum number of Arbortext PE Unterprozesse are running and none are idle.
2. When the Queued Transaction Scheduler starts the execution of a queued transaction, it associates the allocated Arbortext PE Unterprozess with the transaction, so that any request to allocate a Arbortext PE Unterprozess by the queued transaction is satisfied by the transaction that was just allocated. Any attempts to acquire an Arbortext PE Unterprozess by a queued transaction are ignored. The allocated Arbortext PE Unterprozess is released by the Queued Transaction Scheduler after the queued transaction finishes executing.
An alternate way to allocate an Arbortext PE Unterprozess to an immediate request is by using any dynamic component running in the Arbortext PE Request Manager to allocate an Arbortext PE Unterprozess 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.
War dies hilfreich?