define validation query in data source

Description

I'd like to define a validation query in data source. It's not currently possible in Cargo. Here's how it's done in JBoss 7.1 datasource XML:

MySQL:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <datasources xmlns="http://www.jboss.org/ironjacamar/schema"> <datasource jndi-name="java:jboss/datasources/CCPDS" pool-name="MySQLCCPPool"> <connection-url>{JDBC_URL}</connection-url> <driver>mysql-connector-java-5.1.21.jar</driver> <pool> <max-pool-size>30</max-pool-size> </pool> <security> <user-name>{JDBC_USERNAME}</user-name> <password>{JDBC_PASSWORD}</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"></valid-connection-checker> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"></exception-sorter> </validation> </datasource> </datasources>

Oracle:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <datasources xmlns="http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> <datasource jndi-name="java:jboss/datasources/CCPDS" pool-name="OracleCCPPool"> <connection-url>{JDBC_URL}</connection-url> <driver>ojdbc6-11.2.0.3.jar</driver> <pool> <max-pool-size>30</max-pool-size> </pool> <security> <user-name>{JDBC_USERNAME}</user-name> <password>{JDBC_PASSWORD}</password> </security> <validation> <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"></valid-connection-checker> <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"></stale-connection-checker> <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter> </validation> </datasource> </datasources>

Status

Assignee

Unassigned

Reporter

S. Ali Tokmen

Fix versions

Priority

Major
Configure