Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

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>
      {$display:"display-name",$description:"description", $allowed:"allowed", 
      $required:"true|false", $defaultValue:"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>
      {$display:"User Name",$description:"The name of the user.", $required="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 $.
  • 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:
  • $display: Display name of the property.
  • $description: Description about the property.
  • $required: The property is a required property; or optional and a default is supplied.
  • $allowed: If property value must be in certain set of legal values, this defines all the allowed values.
  • $masked: The tools need to mask the property; Do not show in plain text; used for passwords.
  • $advanced: Notes this as Advanced property.
  • $readOnly: 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.