|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.apache.commons.dbcp.PoolingDataSource
public class PoolingDataSource
A simple DataSource implementation that obtains
Connections from the specified ObjectPool.
| Constructor Summary | |
|---|---|
PoolingDataSource()
|
|
PoolingDataSource(ObjectPool pool)
|
|
| Method Summary | ||
|---|---|---|
Connection |
getConnection()
Return a Connection from my pool,
according to the contract specified by ObjectPool.borrowObject(). |
|
Connection |
getConnection(String uname,
String passwd)
Throws UnsupportedOperationException |
|
int |
getLoginTimeout()
Throws UnsupportedOperationException. |
|
PrintWriter |
getLogWriter()
Returns my log writer. |
|
boolean |
isAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property. |
|
boolean |
isWrapperFor(Class<?> iface)
|
|
void |
setAccessToUnderlyingConnectionAllowed(boolean allow)
Sets the value of the accessToUnderlyingConnectionAllowed property. |
|
void |
setLoginTimeout(int seconds)
Throws UnsupportedOperationException. |
|
void |
setLogWriter(PrintWriter out)
Sets my log writer. |
|
void |
setPool(ObjectPool pool)
|
|
|
unwrap(Class<T> iface)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PoolingDataSource()
public PoolingDataSource(ObjectPool pool)
| Method Detail |
|---|
public Connection getConnection()
throws SQLException
Connection from my pool,
according to the contract specified by ObjectPool.borrowObject().
getConnection in interface DataSourceSQLException
public Connection getConnection(String uname,
String passwd)
throws SQLException
UnsupportedOperationException
getConnection in interface DataSourceUnsupportedOperationException
SQLExceptionpublic int getLoginTimeout()
UnsupportedOperationException.
getLoginTimeout in interface CommonDataSourceUnsupportedOperationException - As this
implementation does not support this feature.public PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourceCommonDataSource.getLogWriter()public boolean isAccessToUnderlyingConnectionAllowed()
public boolean isWrapperFor(Class<?> iface)
throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic void setAccessToUnderlyingConnectionAllowed(boolean allow)
allow - Access to the underlying connection is granted when true.public void setLoginTimeout(int seconds)
UnsupportedOperationException.
setLoginTimeout in interface CommonDataSourceUnsupportedOperationException - As this
implementation does not support this feature.public void setLogWriter(PrintWriter out)
setLogWriter in interface CommonDataSourceCommonDataSource.setLogWriter(java.io.PrintWriter)
public void setPool(ObjectPool pool)
throws IllegalStateException,
NullPointerException
IllegalStateException
NullPointerException
public <T> T unwrap(Class<T> iface)
throws SQLException
unwrap in interface WrapperSQLException
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||