Most JDBC drivers allow use of standard property lists to specify the user, password, and other resource configuration information. Although properties are optional with respect to the GlassFish Server, some properties might be necessary for most databases. For details, see the JDBC 4.0 Standard Extension API.
When properties are specified, they are passed to the vendor’s data source class (specified by the datasource-classname attribute) as is using setName(value) methods.
The user and password properties are used as the default principal if container managed authentication is specified and a default-resource-principal is not found in the application deployment descriptors.
The following table describes some common properties for the jdbc-connection-pool element.
Changing JDBC driver properties requires a server restart.
Table 1–80 jdbc-connection-pool Properties
Property |
Description |
---|---|
Specifies the user name for connecting to the database. |
|
Specifies the password for connecting to the database. |
|
Specifies the database for this connection pool. |
|
Specifies the database server for this connection pool. |
|
Specifies the port on which the database server listens for requests. |
|
Specifies the communication protocol. |
|
Specifies the initial SQL role name. |
|
Specifies an underlying XADataSource, or a ConnectionPoolDataSource if connection pooling is done. |
|
Specifies a text description. |
|
Specifies the URL for this connection pool. Although this is not a standard property, it is commonly used. |
|
Specifies that validating idle connections is preferable to closing them. This property has no effect on non-idle connections. If set to true, idle connections are validated during pool resizing, and only those found to be invalid are destroyed and recreated. If false, all idle connections are destroyed and recreated during pool resizing. The default is false. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |
|
Deprecated. Use the equivalent attribute. |