org.apache.commons.dbcp

Class PoolingDriver

public class PoolingDriver extends Object implements Driver

A Driver implementation that obtains Connections from a registered ObjectPool.

Version: $Revision: 500687 $ $Date: 2007-01-27 16:33:47 -0700 (Sat, 27 Jan 2007) $

Author: Rodney Waldhoff Dirk Verbeeck

Constructor Summary
PoolingDriver()
Method Summary
booleanacceptsURL(String url)
voidclosePool(String name)
Connectionconnect(String url, Properties info)
ObjectPoolgetConnectionPool(String name)
intgetMajorVersion()
intgetMinorVersion()
ObjectPoolgetPool(String name)
WARNING: This method throws DbcpExceptions (RuntimeExceptions) and will be replaced by the protected getConnectionPool method.
String[]getPoolNames()
DriverPropertyInfo[]getPropertyInfo(String url, Properties info)
voidinvalidateConnection(Connection conn)
Invalidates the given connection.
static booleanisAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property.
booleanjdbcCompliant()
voidregisterPool(String name, ObjectPool pool)
static voidsetAccessToUnderlyingConnectionAllowed(boolean allow)
Sets the value of the accessToUnderlyingConnectionAllowed property.

Constructor Detail

PoolingDriver

public PoolingDriver()

Method Detail

acceptsURL

public boolean acceptsURL(String url)

closePool

public void closePool(String name)

connect

public Connection connect(String url, Properties info)

getConnectionPool

public ObjectPool getConnectionPool(String name)

getMajorVersion

public int getMajorVersion()

getMinorVersion

public int getMinorVersion()

getPool

public ObjectPool getPool(String name)

Deprecated: 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()

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)

invalidateConnection

public void invalidateConnection(Connection conn)
Invalidates the given connection.

Parameters: conn connection to invalidate

Throws: SQLException if the connection is not a PoolGuardConnectionWrapper or an error occurs invalidating the connection

Since: 1.2.2

isAccessToUnderlyingConnectionAllowed

public static boolean isAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property.

Returns: 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)

Parameters: allow Access to the underlying connection is granted when true.

Copyright © 2001-2004 Apache Software Foundation. Documenation generated December 10 2007.