org.apache.commons.dbcp
Class PoolingDriver
- Driver
public class PoolingDriver
implements Driver
A Driver
implementation that obtains
Connection
s from a registered
ObjectPool
.
$Revision: 500687 $ $Date: 2007-01-27 16:33:47 -0700 (Sat, 27 Jan 2007) $- Rodney Waldhoff
- Dirk Verbeeck
PoolingDriver
public PoolingDriver()
acceptsURL
public boolean acceptsURL(String url)
throws SQLException
closePool
public void closePool(String name)
throws SQLException
connect
public Connection connect(String url,
Properties info)
throws SQLException
getConnectionPool
public ObjectPool getConnectionPool(String name)
throws SQLException
getMajorVersion
public int getMajorVersion()
getMinorVersion
public int getMinorVersion()
getPool
public ObjectPool getPool(String name)
This will be removed in a future version of DBCP.
WARNING: This method throws DbcpExceptions (RuntimeExceptions)
and will be replaced by the protected getConnectionPool method.
getPoolNames
public String[] getPoolNames()
throws SQLException
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url,
Properties info)
invalidateConnection
public void invalidateConnection(Connection conn)
throws SQLException
Invalidates the given connection.
conn
- connection to invalidate
isAccessToUnderlyingConnectionAllowed
public static boolean isAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property.
- true if access to the underlying is allowed, false otherwise.
jdbcCompliant
public boolean jdbcCompliant()
registerPool
public void registerPool(String name,
ObjectPool pool)
setAccessToUnderlyingConnectionAllowed
public static void setAccessToUnderlyingConnectionAllowed(boolean allow)
Sets the value of the accessToUnderlyingConnectionAllowed property.
It controls if the PoolGuard allows access to the underlying connection.
(Default: false)
allow
- Access to the underlying connection is granted when true.
Copyright © 2001-2004 Apache Software Foundation. Documenation generated June 19 2007.