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.
Property Name | Type | Description |
---|---|---|
|
|
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. |
|
|
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] |
|
|
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] |
|
|
Optional setting of properties that has the same format as the property string in a connection URL. |
|
|
Port number on which the Server process is listening on. |
|
|
Secure connection. Flag to indicate to use SSL (mms) based connection between client and server |
|
|
VDB version |
|
|
Name given to this data source |
|
|
Set to false to disable the default load balancing behavior of selecting a new server when a pooled connection is returned to the pool. |
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>
|