View Javadoc

    1   /***
    2    * @(#)DatabaseConstant.java
    3    *
    4    * JFoxSOAF, Service-Oriented Application Framework
    5    *
    6    * Copyright(c) JFoxSOAF Team
    7    *
    8    * Licensed under the GNU LGPL, Version 2.1 (the "License");
    9    * you may not use this file except in compliance with the License.
    10   * You may obtain a copy of the License at
    11   *
    12   * http://www.gnu.org/copyleft/lesser.html
    13   *
    14   * Unless required by applicable law or agreed to in writing, software
    15   * distributed under the License is distributed on an "AS IS" BASIS,
    16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    17   * See the License for the specific language governing permissions and
    18   * limitations under the License.
    19   *
    20   * For more information, please visit:
    21   * http://www.jfox.cn/confluence/display/JFoxSOAF/Home
    22   * http://www.huihoo.org/jfox/jfoxsoaf
    23   */
    24
    25  package org.huihoo.jfox.soaf.services.jdbc;
    26
    27  /***
    28   * <p>
    29   * DataSource configuration definition.
    30   * </p>
    31   *
    32   * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
    33   * @version $Revision: 1.5 $ $Date: 2005/05/22 06:49:48 $
    34   * @version Revision: 1.0
    35   */
    36
    37  public class DatabaseConstant {
    38
    39      // Database Factory Configration
    40
    41      /***
    42       * The name of the property used to identify the LogFactory implementation
    43       * class name.
    44       */
    45      public static final String JDBC_DATABASE_FACTORY = "jdbc.databaseFactory";
    46
    47      /***
    48       * The fully qualified class name of the fallback <code>LogFactory</code>
    49       * implementation class to use, if no other can be found.
    50       */
    51      public static final String JDBC_DEFAULT_FACTORY = "org.huihoo.jfox.soaf.services.jdbc.C3P0DataSourceFactory";
    52
    53      /***
    54       * The name of the properties file to search for.
    55       */
    56      public static final String JDBC_FACTORY_PROPERTIES = "database.properties";
    57
    58      //  Common Database Configuration
    59
    60      public static final String JDBC_DRIVER_CLASS_NAME = "jdbc.driverClassName";
    61
    62      public static final String JDBC_URL = "jdbc.url";
    63
    64      public static final String JDBC_USERNAME = "jdbc.username";
    65
    66      public static final String JDBC_PASSWORD = "jdbc.password";
    67
    68      // Database Connection Pool Configuration
    69
    70      public static final String JDBC_INIT_POOL_SIZE = "jdbc.initialPoolSize";
    71
    72      public static final String JDBC_MIN_POOL_SIZE = "jdbc.minPoolSize";
    73
    74      public static final String JDBC_MAX_POOL_SIZE = "jdbc.maxPoolSize";
    75
    76      public static final String JDBC_MAX_IDLE_TIME = "jdbc.maxIdleTime";
    77
    78      // C3P0 Database Connection Pool Configuration
    79
    80      public static final String C3P0_JDBC_IDLE_CONN_TEST_PERIOD = "c3p0.jdbc.idleConnectionTestPeriod";
    81
    82      public static final String C3P0_JDBC_MAX_STATEMENTS = "c3p0.jdbc.maxStatements";
    83
    84      public static final String C3P0_JDBC_PROPERTY_CYCLE = "c3p0.jdbc.propertyCycle";
    85
    86      public static final String C3P0_JDBC_ACQUIRE_INCREMENT = "c3p0.jdbc.acquireIncrement";
    87
    88      public static final String C3P0_JDBC_ACQUIRE_RETRY_ATTEMPTS = "c3p0.jdbc.acquireRetryAttempts";
    89
    90      public static final String C3P0_JDBC_ACQUIRE_RETRY_DELAY = "c3p0.jdbc.acquireRetryDelay";
    91
    92      public static final String C3P0_JDBC_BREAK_AFTER_ACQUIRE_FAILURE = "c3p0.jdbc.breakAfterAcquireFailure";
    93
    94      public static final String C3P0_JDBC_TEST_CONN_ON_CHECKOUT = "c3p0.jdbc.testConnectionOnCheckout";
    95
    96      public static final String C3P0_JDBC_AUTO_COMMIT_ON_CLOSE = "c3p0.jdbc.autoCommitOnClose";
    97
    98      public static final String C3P0_JDBC_FORCE_IGNORE_UNRESOLVED_TRANS = "c3p0.jdbc.forceIgnoreUnresolvedTransactions";
    99
    100     public static final String C3P0_JDBC_NUM_HELPER_THREADS = "c3p0.jdbc.numHelperThreads";
    101
    102     public static final String C3P0_JDBC_USES_TRADITIONAL_REFELECTIVE_PROXIES = "c3p0.jdbc.usesTraditionalReflectiveProxies";
    103
    104     public static final String C3P0_JDBC_FACTORY_CLASS_LOCATION = "c3p0.jdbc.factoryClassLocation";
    105
    106 }