DBResources.java [src/soils/db] Revision: default  Date:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package soils.db;

import csip.annotations.Resource;
import static csip.annotations.ResourceType.JDBC;
import static soils.db.DBResources.SDM;
import static soils.db.DBResources.SSURGO;
import static soils.db.DBResources.SDM_REST;

/**
 *
 * @author <a href="mailto:shaun.case@colostate.edu">Shaun Case</a>
 */
@Resource(type = JDBC, file = "${soils.gis.database.db}", id = SSURGO, env = {
    "removeAbandoned=true", "defaultReadOnly=true", "defaultAutoCommit=false", "maxWait=300000", "jmxEnabled=false",
    "jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;"
    + "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;"
    + "org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer"
})

@Resource(type = JDBC, file = "${soils.gis.database.db}", id = SDM, env = {
    "removeAbandoned=true", "defaultReadOnly=true", "defaultAutoCommit=false", "maxWait=300000", "jmxEnabled=false",
    "jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;"
    + "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;"
    + "org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer"
})

@Resource(type = JDBC, file = "${soils.database.db}", id = SDM_REST, env = {
    "driverClassName=csip.sdm.SDMDriver", "validationQuery=SELECT 1 FROM mapunit;",
    "maxWait=300000", "testOnBorrow=false",
    "removeAbandoned=true", "defaultReadOnly=true", "defaultAutoCommit=false", "jmxEnabled=false",
    "validationInterval=300000", "maxActive=2500", "maxIdle=100",
    "jdbcInterceptors=org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;"
    + "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;"
    + "org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer"
})

public interface DBResources {

    static final String SSURGO = "csip.ssurgo";
    static final String SDM = "csip.soils.sqlsvr";
    static final String SDM_REST = "SDMDriver";
    static final String PROVIDER_TYPE = "soils.gis.database.source";
}