ApplicationResources.java [src/java/m/crp1] 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-2022, 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 m.crp1;

import csip.annotations.Resource;
import static csip.annotations.ResourceType.JDBC;
import static m.crp1.ApplicationResources.*;
import csip.Config;

/**
 *
 * @author Shaun Case
 */
@Resource(type = JDBC, file = "${crp1.gis.database.db}", id = EROSION_GIS_SQLSERVER, 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 = "${crp1.legacy.database.db}", id = CRP_LEGACY_DATABASE, 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 = "${crp1.nrt.database.db}", id = NRT_DB, 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"
})

public interface ApplicationResources {

  String EROSION_GIS_SQLSERVER = "csip.crp1.gis.sqlsvr";
  String CRP_LEGACY_DATABASE = "legacy.database";
  String NRT_DB = "nrt.database";
  //
  String SOILS_GIS_DATABASE_SOURCE = Config.getString("soils.gis.database.source", "SDM");
  String CRP1_DEMSLOPE_URL = Config.getString("crp1.demslope.url", "http://csip.engr.colostate.edu:8092/csip-watershed/m/average_slope/4.0");
  String CRP1_RUSLE_URL = Config.getString("crp1.rusle2.url", "http://csip.engr.colostate.edu:8092/csip-r2/m/rusle2/5.0");
  String CRP1_WEPS_URL = Config.getString("crp1.weps.url", "http://csip.engr.colostate.edu:8092/csip-weps/m/weps/5.3");
}