Skip to main content

Source code revision

svn

summary: Adding support for a new feature of Jdbc connection pool : Custom validation.
revision: 28973
author: sm157516
date: 2009-07-12 11:27:46 UTC (5 years)
message: Adding support for a new feature of Jdbc connection pool : Custom validation.

Using Custom validation a user can specify his/her own implementation that will be used during connection validation. This feature aids user to call database specific optimized or faster validation routines.

The existing attribute connection-validation-method could be set to a value custom-validation. Other existing validation mechanisms available in JDBC Connection pool are table/auto-commit/metadata.

A public interface org.glassfish.api.jdbc.ConnectionValidation will be introduced which developers can implement to plugin their implementations.

A new attribute validation-classname will be used to specify the fully-qualified name of the Class that implements the ConnectionValidation interface. Administrators or developers could provide the custom validation implementation that should be made available to the application server. When connection-validation-method is set to custom-validation, the attribute validation-classname is mandatory.

By default, custom validation mechanisms will be provided for Derby, MySQL, Oracle and Postgres for faster and optimized validation routines. Additionally, for JDBC 40 compliant database drivers, a validation mechanism will be provided that uses Connection.isValid(0) implementation.

Reviewed by : Jagadish Ramu

Tests run : Connector/jdbc devtests, QL

Change Path Actions
M trunk/v3/admin/config-api/src/main/java/com/sun/enterprise/config/serverbeans/JdbcConnectionPool.java
M trunk/v3/common/amx-core/src/main/java/org/glassfish/admin/amx/base/ConnectorRuntimeAPIProvider.java
M trunk/v3/common/amx-ext-impl/src/main/java/org/glassfish/admin/amx/impl/ext/ConnectorRuntimeAPIProviderImpl.java
M trunk/v3/common/glassfish-api/osgi.bundle
M trunk/v3/connectors/connectors-internal-api/osgi.bundle
M trunk/v3/connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorRuntime.java
M trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/ConnectorRuntime.java
M trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/connectors/service/JdbcAdminServiceImpl.java
M trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/DataSourceDefinitionDeployer.java
M trunk/v3/connectors/connectors-runtime/src/main/java/com/sun/enterprise/resource/deployer/JdbcConnectionPoolDeployer.java
M trunk/v3/jdbc/jdbc-ra/jdbc-core/src/main/java/com/sun/gjc/common/DataSourceSpec.java
M trunk/v3/jdbc/jdbc-ra/jdbc-core/src/main/java/com/sun/gjc/spi/ManagedConnectionFactory.java
M trunk/v3/jdbc/jdbc-ra/jdbc-core/src/main/resources/com/sun/gjc/spi/LogStrings.properties
 
 
Close
loading
Please Confirm
Close