2.6. Specify Configuration Properties in an ra.xml File
2.6. Specify Configuration Properties in an ra.xml File Every configuration property defined inside the new Managed Connection Factory class must also be configured in the ra.xml file. These properties are used to configure each instance of the connector. An example file is provided in Section A.1, "Template for ra.xml" . The following is the format for a single entry: <config-property> <description> {USDdisplay:"display-name",USDdescription:"description", USDallowed:"allowed", USDrequired:"true|false", USDdefaultValue:"default-value"} </description> <config-property-name>property-name</config-property-name> <config-property-type>property-type</config-property-type> <config-property-value>optional-property-value</config-property-value> </config-property> For example: <config-property> <description> {USDdisplay:"User Name",USDdescription:"The name of the user.", USDrequired="true"} </description> <config-property-name>UserName</config-property-name> <config-property-type>java.lang.String</config-property-type> </config-property> The format and contents of the <description> element may be used as extended metadata for tooling. This use of the special format and all properties is optional and must follow these rules: The special format must begin and end with curly braces e.g. { } . Property names begin with USD . Property names and the associated value are separated with a colon ( : ). Double quotes ( " ) identifies a single value. A pair of square brackets ( [ ] ), containing comma separated double quoted entries indicates a list value. The following are optional properties: USDdisplay : Display name of the property. USDdescription : Description about the property. USDrequired : The property is a required property; or optional and a default is supplied. USDallowed : If property value must be in certain set of legal values, this defines all the allowed values. USDmasked : The tools need to mask the property; Do not show in plain text; used for passwords. USDadvanced : Notes this as Advanced property. USDreadOnly : Property is set to read-only. Note Although these are optional properties, in the absence of this metadata, Red Hat JBoss Data Virtualization tooling may not work as expected. Note You can also undertake the process using the maven archetype .
<config-property> <description> {USDdisplay:"display-name",USDdescription:"description", USDallowed:"allowed", USDrequired:"true|false", USDdefaultValue:"default-value"} </description> <config-property-name>property-name</config-property-name> <config-property-type>property-type</config-property-type> <config-property-value>optional-property-value</config-property-value> </config-property> <config-property> <description> {USDdisplay:"User Name",USDdescription:"The name of the user.", USDrequired="true"} </description> <config-property-name>UserName</config-property-name> <config-property-type>java.lang.String</config-property-type> </config-property>