|
||||||
| 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(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. |
|
boolean |
isAccessToUnderlyingConnectionAllowed()
Returns the value of the accessToUnderlyingConnectionAllowed property. |
|
boolean |
isWrapperFor(java.lang.Class<?> iface)
|
|
void |
setAccessToUnderlyingConnectionAllowed(boolean allow)
Sets the value of the accessToUnderlyingConnectionAllowed property. |
|
void |
setLoginTimeout(int seconds)
Throws UnsupportedOperationException. |
|
void |
setLogWriter(java.io.PrintWriter out)
Sets my log writer. |
|
void |
setPool(org.apache.commons.pool.ObjectPool pool)
|
|
|
unwrap(java.lang.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(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.DataSourcejava.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.DataSourcejava.lang.UnsupportedOperationException
java.sql.SQLExceptionpublic int getLoginTimeout()
UnsupportedOperationException.
getLoginTimeout in interface javax.sql.CommonDataSourcejava.lang.UnsupportedOperationException - As this
implementation does not support this feature.public java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.CommonDataSourceCommonDataSource.getLogWriter()public boolean isAccessToUnderlyingConnectionAllowed()
public boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic void setAccessToUnderlyingConnectionAllowed(boolean allow)
allow - Access to the underlying connection is granted when true.public void setLoginTimeout(int seconds)
UnsupportedOperationException.
setLoginTimeout in interface javax.sql.CommonDataSourcejava.lang.UnsupportedOperationException - As this
implementation does not support this feature.public void setLogWriter(java.io.PrintWriter out)
setLogWriter in interface javax.sql.CommonDataSourceCommonDataSource.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
public <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLException
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||