001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software GmbH & Co. KG, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.db;
029
030/**
031 * Connection pooling is now done by CmsDbPoolV11, and everything except the constants
032 * have been removed from this class. Once JPA integration is removed, this class can be deleted.
033 *
034 * @since 6.0.0
035 */
036@Deprecated
037public final class CmsDbPool {
038
039    /** This prefix is required to make the JDBC DriverManager return pooled DBCP connections. */
040    public static final String DBCP_JDBC_URL_PREFIX = "jdbc:apache:commons:dbcp:";
041
042    /** Key for number of connection attempts. */
043    public static final String KEY_CONNECT_ATTEMTS = "connects";
044
045    /** Key for connection waiting. */
046    public static final String KEY_CONNECT_WAITS = "wait";
047
048    /** Prefix for database keys. */
049    public static final String KEY_DATABASE = "db.";
050
051    /** Key for the database name. */
052    public static final String KEY_DATABASE_NAME = KEY_DATABASE + "name";
053
054    /** Key for the pool id. */
055    public static final String KEY_DATABASE_POOL = KEY_DATABASE + "pool";
056
057    /** Key for statement pooling. */
058    public static final String KEY_DATABASE_STATEMENTS = KEY_DATABASE + "statements";
059
060    /** Key for the entity manager pool size. */
061    public static final String KEY_ENTITY_MANAGER_POOL_SIZE = "entityMangerPoolSize";
062
063    /** Key for jdbc driver. */
064    public static final String KEY_CONNECTION_PROPERTIES = "connectionProperties";
065
066    /** Key for jdbc driver. */
067    public static final String KEY_JDBC_DRIVER = "jdbcDriver";
068
069    /** Key for jdbc url. */
070    public static final String KEY_JDBC_URL = "jdbcUrl";
071
072    /** Key for jdbc url params. */
073    public static final String KEY_JDBC_URL_PARAMS = KEY_JDBC_URL + ".params";
074
075    /** Key for maximum active connections. */
076    public static final String KEY_MAX_ACTIVE = "maxActive";
077
078    /** Key for maximum idle connections. */
079    public static final String KEY_MAX_IDLE = "maxIdle";
080
081    /** Key for maximum wait time. */
082    public static final String KEY_MAX_WAIT = "maxWait";
083
084    /** Key for minimum idle time before a connection is subject to an eviction test. */
085    public static final String KEY_MIN_EVICTABLE_IDLE_TIME = "minEvictableIdleTime";
086
087    /** Key for minimum number of connections kept open. */
088    public static final String KEY_MIN_IDLE = "minIdle";
089
090    /** Key for number of tested connections per run. */
091    public static final String KEY_NUM_TESTS_PER_EVICTION_RUN = "numTestsPerEvictionRun";
092
093    /** Key for database password. */
094    public static final String KEY_PASSWORD = "password";
095
096    /** Key for default. */
097    public static final String KEY_POOL_DEFAULT = "default";
098
099    /** Key for pool url. */
100    public static final String KEY_POOL_URL = "poolUrl";
101
102    /** Key for pool user. */
103    public static final String KEY_POOL_USER = "user";
104
105    /** Key for vfs pool. */
106    public static final String KEY_POOL_VFS = "vfs";
107
108    /** Key for pooling flag. */
109    public static final String KEY_POOLING = "pooling";
110
111    /** Key for test on borrow flag. */
112    public static final String KEY_TEST_ON_BORROW = "testOnBorrow";
113
114    /** Key for test query. */
115    public static final String KEY_TEST_QUERY = "testQuery";
116
117    /** Key for test while idle flag. */
118    public static final String KEY_TEST_WHILE_IDLE = "testWhileIdle";
119
120    /** Key for time between two eviction runs. */
121    public static final String KEY_TIME_BETWEEN_EVICTION_RUNS = "timeBetweenEvictionRuns";
122
123    /** Key for user name. */
124    public static final String KEY_USERNAME = "user";
125
126    /** Key for "when pool exhausted" action. */
127    public static final String KEY_WHEN_EXHAUSTED_ACTION = "whenExhaustedAction";
128
129    /** The name of the opencms default pool. */
130    public static final String OPENCMS_DEFAULT_POOL_NAME = "default";
131
132    /** The default OpenCms JDBC pool URL. */
133    public static final String OPENCMS_DEFAULT_POOL_URL = "opencms:default";
134
135    /** The prefix used for opencms JDBC pools. */
136    public static final String OPENCMS_URL_PREFIX = "opencms:";
137
138    /**
139     * Hidden constructor.<p>
140     */
141    private CmsDbPool() {
142        // hidden constructor
143    }
144
145}