|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.dbcp.PoolingDataSource
A simple DataSource
implementation that obtains
Connection
s from the specified ObjectPool
.
Field Summary | |
protected java.io.PrintWriter |
_logWriter
My log writer. |
protected org.apache.commons.pool.ObjectPool |
_pool
|
Constructor Summary | |
PoolingDataSource()
|
|
PoolingDataSource(org.apache.commons.pool.ObjectPool pool)
|
Method Summary | |
java.sql.Connection |
getConnection()
Return a Connection from my pool,
according to the contract specified by ObjectPool.borrowObject() . |
java.sql.Connection |
getConnection(java.lang.String uname,
java.lang.String passwd)
Throws UnsupportedOperationException |
int |
getLoginTimeout()
Throws UnsupportedOperationException . |
java.io.PrintWriter |
getLogWriter()
Returns my log writer. |
void |
setLoginTimeout(int seconds)
Throws UnsupportedOperationException . |
void |
setLogWriter(java.io.PrintWriter out)
Sets my log writer. |
void |
setPool(org.apache.commons.pool.ObjectPool pool)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.PrintWriter _logWriter
protected org.apache.commons.pool.ObjectPool _pool
Constructor Detail |
public PoolingDataSource()
public PoolingDataSource(org.apache.commons.pool.ObjectPool pool)
Method Detail |
public java.sql.Connection getConnection() throws java.sql.SQLException
Connection
from my pool,
according to the contract specified by ObjectPool.borrowObject()
.
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String uname, java.lang.String passwd) throws java.sql.SQLException
UnsupportedOperationException
getConnection
in interface javax.sql.DataSource
java.lang.UnsupportedOperationException
java.sql.SQLException
public int getLoginTimeout()
UnsupportedOperationException
.
Do this configuration within my ObjectPool
.
getLoginTimeout
in interface javax.sql.DataSource
java.lang.UnsupportedOperationException
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.DataSource
DataSource.getLogWriter()
public void setLoginTimeout(int seconds)
UnsupportedOperationException
.
Do this configuration within my ObjectPool
.
setLoginTimeout
in interface javax.sql.DataSource
java.lang.UnsupportedOperationException
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.DataSource
DataSource.setLogWriter(java.io.PrintWriter)
public void setPool(org.apache.commons.pool.ObjectPool pool) throws java.lang.IllegalStateException, java.lang.NullPointerException
java.lang.IllegalStateException
java.lang.NullPointerException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |