Activity - sqlResilient
Activity Type: Relational Multi-resource
Description
Return the results of the same query executed on a number of relational data resources, each one of them being exposed by a corresponding data service resource, from the first available data resource.
Example
<sqlResilient name="sqlOr">
<sqlStatement value="SELECT * FROM littleblackbook WHERE id=5"/>
<timeout>100000</timeout>
<sqlResilientOutput name="sqlOutput"/>
</sqlResilient>
Specification
Element sqlResilient:
- Attribute name - unique name for the activity within the scope of a request.
- Element sqlStatement (required) - define the SQL query to be sent to the data resources.
- Attribute value - the SQL query command to be executed.
- Element timeout(optional) - the amount of time within the data resource should return results. Should be a non-negative long number. The following rule describes how the timeout will be defined:
-
- If the value provided is zero, then the timeout is considered as unlimited.
- If the value provided is greater than zero then then the timeout is considered as the minimum between the value provided and the maximum timeout defined in the associated SQL multiple data resource accessor
- If no value is provided, then the timeout is equal to the default timeout defined in the associated SQL multiple data resource accessor
- Element sqlResilientOutput (required) - output stream which produces the results of the SQL query. The output format is a WebRowSet document.
- Attribute name - name of this output stream.
Input and Output Types
- Inputs: none
- Output: sqlResilientOutput - java.lang.String in a WebRowSet format.
Data Resource Accessor
This activity is compatible with the uk.org.ogsadai.dataresource.SQLMultipleDataResourceAccessor data resource accessor
XML Schema
OGSA-DAI/schema/ogsadai/xsd/activities/sql_resilient.xsd
Class
uk.org.ogsadai.activity.sql.SQLResilientQueryActivity
Client Toolkit Class
uk.org.ogsadai.client.toolkit.activity.sql.SQLResilientQuery