DataSource Connection

To use a data source based connection, use org.teiid.jdbc.TeiidDataSource as the data source class. The TeiidDataSource is also an XADatasource. Teiid DataSource class is also Serializable, so it possible for it to be used with JNDI naming services.

Teiid supports the XA protocol, XA transactions will be extended to Teiid sources that also support XA.

All the properties (except for version, which is known on TeiidDataSource as DatabaseVersion) defined in the Driver Connection#URL Connection Properties have corresponding "set" methods on the org.teiid.jdbc.TeiidDataSource. Properties that are assumed from the URL string have additional "set" methods, which are described in the following table.

Table 1. Datasource Properties
Property Name Type Description

DatabaseName

String

The name of a virtual database (VDB) deployed to Teiid. Optionally Database name can also contain "DatabaseVersion" information inside it. For example: "myvdb.2", this is equivalent to supplying the "DatabaseVersion" property set to value of 2. However, use of Database name in this format and use of DatabaseVersion property at the same time is not allowed.

ServerName

String

Server hostname where the Teiid runtime installed. If you are using IPv6 binding address as the host name, place it in square brackets. ex:[::1]

AlternateServers

String

Optional delimited list of host:port entries. See the Using Multiple Hosts for more information. If you are using IPv6 binding address as the host name, place them in square brackets. ex:[::1]

AdditionalProperties

String

Optional setting of properties that has the same format as the property string in a connection URL.

PortNumber

integer

Port number on which the Server process is listening on.

secure

boolean

Secure connection. Flag to indicate to use SSL (mms) based connection between client and server

DatabaseVersion

integer

VDB version

DataSourceName

String

Name given to this data source

Note
Additional Properties - All the properties from URL Connection Properties can be used on DataSource using the AdditionalProperties setter method if the corresponding setter method is not already available. For example, you can add "useCallingThread" property as <xa-datasource-property name="AdditionalProperties">useCallingThread=false</xa-datasource-property>

results matching ""

    No results matching ""