ServiceResources.java [src/java/database] Revision: default  Date:
/*
 * $Id$
 *
 * This file is part of the Cloud Services Integration Platform (CSIP),
 * a Model-as-a-Service framework, API, and application suite.
 *
 * 2012-2017, OMSLab, Colorado State University.
 *
 * OMSLab licenses this file to you under the MIT license.
 * See the LICENSE file in the project root for more information.
 */
package database;

import csip.annotations.*;
import static csip.annotations.ResourceType.*;
import static database.ServiceResources.LMOD_ID;
import static soils.db.DBResources.SDM_REST;


/**
 * Shared LMOD Service resources.
 *
 * @author od
 */
// LMOD SQL DB
@Resource(type = JDBC, 
        file = "${lmod.db}", 
        id = LMOD_ID,
        env = {"maxWait=6000000",
            "jmxEnabled=false",
            "logAbandoned=true",
            "removeAbandonedTimeout=3000",
            "testOnBorrow=true",
            "validationQuery=SELECT 1",
            "testOnReturn=false",
            "validationInterval=30000",
            "timeBetweenEvictionRunsMillis=30000",
            "removeAbandoned=true",
            "defaultAutoCommit=false"
        }
        )

@Resource(type = JDBC, file = "${soils.database.db}", id = SDM_REST , env = {
        "driverClassName=csip.sdm.SDMDriver","validationQuery=SELECT 1 FROM mapunit;",
"maxWait=300000", "testOnBorrow=false"
})

public interface ServiceResources {
    // resource ids
    static final String LMOD_ID = "lmod";
}