|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.dbcp.PoolingDataSource
public class PoolingDataSource
A simple DataSource
implementation that obtains
Connection
s from the specified ObjectPool
.
Field Summary | |
---|---|
protected PrintWriter |
_logWriter
My log writer. |
protected ObjectPool |
_pool
|
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. |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PrintWriter _logWriter
protected ObjectPool _pool
Constructor Detail |
---|
public PoolingDataSource()
public PoolingDataSource(ObjectPool pool)
Method Detail |
---|
public void setPool(ObjectPool pool) throws IllegalStateException, NullPointerException
IllegalStateException
NullPointerException
public boolean isAccessToUnderlyingConnectionAllowed()
public void setAccessToUnderlyingConnectionAllowed(boolean allow)
allow
- Access to the underlying connection is granted when true.public Connection getConnection() throws SQLException
Connection
from my pool,
according to the contract specified by ObjectPool.borrowObject()
.
getConnection
in interface DataSource
SQLException
public Connection getConnection(String uname, String passwd) throws SQLException
UnsupportedOperationException
getConnection
in interface DataSource
UnsupportedOperationException
SQLException
public PrintWriter getLogWriter()
getLogWriter
in interface DataSource
DataSource.getLogWriter()
public int getLoginTimeout()
UnsupportedOperationException
.
getLoginTimeout
in interface DataSource
UnsupportedOperationException
- As this
implementation does not support this feature.public void setLoginTimeout(int seconds)
UnsupportedOperationException
.
setLoginTimeout
in interface DataSource
UnsupportedOperationException
- As this
implementation does not support this feature.public void setLogWriter(PrintWriter out)
setLogWriter
in interface DataSource
DataSource.setLogWriter(java.io.PrintWriter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |