Class DataSourceFactory

java.lang.Object
org.apache.tomcat.jdbc.pool.DataSourceFactory
All Implemented Interfaces:
ObjectFactory

public class DataSourceFactory extends Object implements ObjectFactory

JNDI object factory that creates an instance of BasicDataSource that has been configured based on the RefAddr values of the specified Reference, which must match the names and data types of the BasicDataSource bean properties.


Properties available for configuration:
Commons DBCP properties
  1. initSQL - A query that gets executed once, right after the connection is established.
  2. testOnConnect - run validationQuery after connection has been established.
  3. validationInterval - avoid excess validation, only run validation at most at this frequency - time in milliseconds.
  4. jdbcInterceptors - a semicolon separated list of classnames extending JdbcInterceptor class.
  5. jmxEnabled - true of false, whether to register the pool with JMX.
  6. fairQueue - true of false, whether the pool should sacrifice a little bit of performance for true fairness.
Author:
Craig R. McClanahan, Dirk Verbeeck