ca.cbc.sportwire.util
Class JdbcConnections
java.lang.Object
|
+--org.apache.xalan.lib.sql.DefaultConnectionPool
|
+--ca.cbc.sportwire.util.JdbcConnections
- All Implemented Interfaces:
- org.apache.xalan.lib.sql.ConnectionPool
- public class JdbcConnections
- extends org.apache.xalan.lib.sql.DefaultConnectionPool
JdbcConnections.java: offers connection pools as a global
object by implementing the pool server as a singleton.
Created: Tue Nov 20 00:38:36 2001
$Log: JdbcConnections.java,v $
Revision 1.5 2002/02/27 03:57:22 garym
Added support for the more interesting sportwire DTDs
Revision 1.4 2002/01/24 19:49:24 garym
added path search and debug statements
Revision 1.3 2002/01/16 23:09:25 garym
Implemented the JDBC pool support and sql property beans
Revision 1.2 2001/11/26 20:19:26 garym
Stores OLDTEXT unless the text field is too long
Revision 1.1 2001/11/23 19:37:58 garym
fixed build scripts for Util; moved JdbcConnections into shared jar
Revision 1.2 2001/11/21 05:35:35 garym
Fixed race conditions in singletons; implement different Map hack
Revision 1.1 2001/11/20 18:36:55 garym
Added connection pools to the MapServer
- Version:
- $Id: JdbcConnections.java,v 1.5 2002/02/27 03:57:22 garym Exp $
- Author:
- Gary Lawrence Murphy
Fields inherited from class org.apache.xalan.lib.sql.DefaultConnectionPool |
DEBUG, m_ConnectionProtocol, m_driver, m_IsActive, m_pool, m_PoolMinSize, m_url |
Constructor Summary |
JdbcConnections(org.apache.commons.collections.ExtendedProperties eprops)
|
Methods inherited from class org.apache.xalan.lib.sql.DefaultConnectionPool |
addConnection, createConnection, finalize, freeUnused, hasActiveConnections, initializePool, isEnabled, releaseConnectionOnError, setDriver, setMinConnections, setPassword, setPoolEnabled, setProtocol, setUser, testConnection |
Methods inherited from class java.lang.Object |
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
MIN_CONNECTIONS
private static final int MIN_CONNECTIONS
JDBC_POOL_MIN
private static final java.lang.String JDBC_POOL_MIN
JDBC_DRIVER
private static final java.lang.String JDBC_DRIVER
JDBC_URL
private static final java.lang.String JDBC_URL
JDBC_USER
private static final java.lang.String JDBC_USER
JDBC_PASSWD
private static final java.lang.String JDBC_PASSWD
cat
static org.apache.log4j.Category cat
- Set up a reporting category in Log4J
_instance
private static JdbcConnections _instance
connected
private boolean connected
used
private int used
url
private java.lang.String url
JdbcConnections
public JdbcConnections(org.apache.commons.collections.ExtendedProperties eprops)
isConnected
public boolean isConnected()
- Get the value of connected.
- Returns:
- boolean value of connected.
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Overrides:
getConnection
in class org.apache.xalan.lib.sql.DefaultConnectionPool
releaseConnection
public void releaseConnection(java.sql.Connection conn)
throws java.sql.SQLException
- Overrides:
releaseConnection
in class org.apache.xalan.lib.sql.DefaultConnectionPool
setConnected
protected boolean setConnected(boolean v)
- Set the value of connected.
- Parameters:
v
- Value to assign to connected.
setURL
public void setURL(java.lang.String url)
- Overrides:
setURL
in class org.apache.xalan.lib.sql.DefaultConnectionPool
getInstance
public static JdbcConnections getInstance(org.apache.commons.collections.ExtendedProperties eprops)
getInstance
returns the singleton connection
pool. this is done to ensure the number of active connections
is kept to a minimum and each connection is used as much as
possible.
- Returns:
- a
JdbcConnections
value