搜索

此内容没有您所选择的语言版本。

2.6. Specify Configuration Properties in an ra.xml File

download PDF
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.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.