The jdbc-resource element can contain the following subelements:
Table 3–27 List of jdbc-resource Subelements
Element |
Occurrences |
Description |
---|---|---|
enabled |
0 or 1 |
Determines whether the resource is enabled at runtime. The default value is true. |
jndi-name |
1 |
The JNDI name of the resource. |
datasource-class |
1 |
The JDBC driver class. The value is a name of the class that implements java.sql.DataSource and java.sql.XADataSource. |
min-connections |
1 |
The minimum number of concurrent connections to maintain to the database server. The value can be from 1 to 4096. |
max-connections |
1 |
The maximum number of concurrent connections to maintain to the database server. The value can be from 1 to 4096. |
idle-timeout |
1 |
The timeout (in seconds) after which an idle connection to the database server will be closed. The value can be from 0 to 3600, or -1 for no timeout. |
wait-timeout |
1 |
The timeout (in seconds) after which a caller waiting for an available connection to the database server will receive an error. The value can be from 0.001 to 3600, or -1 for no timeout. |
isolation-level |
0 or 1 |
Specifies the transaction isolation level. The value can be read-uncommitted, read-committed, repeatable-read, or serializable. |
isolation-level-guaranteed |
0 or 1 |
Determines whether the server sets the isolation level each time a connection is leased to an application. The default value is false. |
connection-validation |
0 or 1 |
Specifies how the server validates a connection before leasing it to an application. The value can be false, auto-commit, meta-data, or table. |
connection-validation-table-name |
0 or 1 |
The name of the table used when connection-validation is table. The value is the database table name. |
fail-all-connections |
0 or 1 |
Determines whether all connections are immediately closed and reestablished when there is an error validating an individual connection. The default value is false. |
property |
0 or more |
Configures the JDBC driver (java.sql.DataSource and java.sql.XADataSource) properties. For more details, see property. |
connection-creation-property |
0 or more |
Configures the JDBC connection (java.sql.Connection) properties, when a new connection is created. For more details, see connection-creation-property. |
connection-lease-property |
0 or more |
Configures the JDBC connection (java.sql.Connection) properties each time a connection is leased to an application. For more details, see connection-lease-property. |
description |
0 or 1 |
The description of the resource. |