REQUEST_RESULT (for an application)
This REQUEST_RESULT
element specifies the number of seconds the GAS waits for the DVM
to respond to pending transactions.
Syntax
<REQUEST_RESULT>seconds</REQUEST_RESULT>
- seconds specifies the number of seconds to wait for a response from a
transaction request. The default timeout is 45 seconds, set by the resource
$(app.timeout.requestresult)
.
Child elements
There are no child elements.
Usage
You use the REQUEST_RESULT
timeout to provide information to the user when a
transaction is taking longer than expected. After the timeout expires, the GAS sends a "transaction pending" page to the front-end to inform
the user that this transaction is taking longer than expected. This is also known as sending a
keep-alive response. The default transaction pending page automatically submits a new request to
wait for the DVM to complete its processing.
Under normal operations, the front-end sends a
GET
request to the GAS immediately after a response. Meanwhile, the GAS stores data sent by the DVM for the application
in its buffer, waiting for a GET
request from the front-end. When the
GET
request is received by the GAS, these conditions determine the response:- If the server has data sent by the DVM in its buffer, the stored data is sent back to the front-end.
- If the DVM does not have data to send, the GAS waits and, if the DVM is still processing the request after the specified
REQUEST_RESULT
timeout expires, it sends the keep-alive response to the front-end and resets theREQUEST_RESULT
timer.
Important:
When configuring this setting, you must ensure it is less than the Common Gateway Interface (CGI) timeout of the web server you are using.
Usage example with resource
<REQUEST_RESULT>$(app.timeout.requestresult)</REQUEST_RESULT>
The
default value of the resource $(app.timeout.requestresult)
is 45 seconds. You can
set a REQUEST_RESULT
with the resource: <RESOURCE Id="app.timeout.requestresult" Source="INTERNAL">30</RESOURCE>
In this example,
the timeout duration is set to 30 seconds, which means the GAS waits 30 seconds before sending a
"transaction pending" page to the front-end to inform the user that this transaction is taking
longer than expected and resetting the REQUEST_RESULT
timer.Using the resource has advantages over setting the timeout directly for the following reasons:
- Shared resource: The resource is shared by other configuration components, ensuring that any changes automatically apply everywhere it is used.
- Command line override: You can override the default value from the command line when
starting the dispatcher by using the resource. For example:
httpdispatch -E app.timeout.requestresult=50
.
Usage example - use REQUEST_RESULT directly
To set the
In this example,
the timeout duration is set to 30 seconds, which means the GAS waits 30 seconds before sending a
"transaction pending" page to the front-end to inform the user that this transaction is taking
longer than expected and resetting the REQUEST_RESULT
in your application configuration file (xcf),
add a TIMEOUT
element.<APPLICATION Parent="defaultwa">
#...
<TIMEOUT>
<REQUEST_RESULT>30</REQUEST_RESULT>
</TIMEOUT>
#...
</APPLICATION>
REQUEST_RESULT
timer.Parent elements
This element is a child of the following: