provider
Database provider — A Database provider for the template service<provider/>
| Name: | provider |
| Required by Parent Tag: | No |
| Multiple Tag Instances supported: | Yes |
Table 54. Attributes for provider tag (for xms.template.provider.DBProvider)
| Name | Friendly Name | Description | Type | Default Value | Required |
|---|---|---|---|---|---|
| class | Class | The class name the service manager loads. To load: Database provider use: class xms.template.provider.DBProvider | Class Name A fully qualified class name for a class that is part of the java classpath. | xms.template.provider.DBProvider | Yes |
| datasource | Datasource | The data source to direct queries to | String Any character combination is valid. | none | Yes |
| fetchsize | Fetch Size | Number of row to retrieve at a time | Integer Value must be an integer between -2147483648 and 2147483647 | 0 | No |
| isstoredproc | Stored Procedure | Is this a stored procedure? | Boolean Possible Values: true or false | false | No |
| columnmap | Column Map | Set template variable to column mappings | Value Map List A comma seperated list of name=value pairs | No | |
| onempty | On empty | Sets the behavior when this query returns no results | Finite Value Set Value Must be one of the following: [stop, fail, continue] | stop | No |
| streamresults | Stream Results | Stream results directly from database | Boolean Possible Values: true or false | true | No |
| sublist | Sublist | If set, assigns the entire results of this query to the specified variable | String Any character combination is valid. | No | |
| timeout | Timeout | Timeout in ms for query | Unsigned Integer Valid values are from 0 to 2147483647 | 0 | No |
| name | Name | A name for this provider | String Any character combination is valid. | none | No |
<commitpoint/>
| Name: | commitpoint |
| Required by Parent Tag: | No |
| Multiple Tag Instances supported: | Yes |
![]() | Note |
|---|---|
| There are no Attributes for this tag | |
<action/>
| Name: | action |
| Required by Parent Tag: | No |
| Multiple Tag Instances supported: | Yes |
Table 57. Attributes for action tag (for xms.template.provider.DBProvider)
| Name | Friendly Name | Description | Type | Default Value | Required |
|---|---|---|---|---|---|
| class | Class Name | The class name to load. The class must implement: xms.action.Action | Class Name A fully qualified class name for a class that is part of the java classpath. | none | Yes |
The following classes can be used in the class attribute for this tag:
Example 48. Example configuration for Database provider
Required attributes are marked with a bold typeface
<provider class="xms.template.provider.DBProvider" datasource="datasource" fetchsize="0" isstoredproc="false" columnmap="" onempty="stop" streamresults="true" sublist="" timeout="0" name="name"> <sql > Inner Text Value </sql> <param > Inner Text Value </param> <commitpoint <action class="class" /> </commitpoint> </provider>