|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.dbcp.PoolingDataSource
org.apache.commons.dbcp.managed.ManagedDataSource
public class ManagedDataSource
The ManagedDataSource is a PoolingDataSource that creates ManagedConnections.
Constructor Summary | |
---|---|
ManagedDataSource()
Creates an uninitialized datasource. |
|
ManagedDataSource(ObjectPool pool,
TransactionRegistry transactionRegistry)
Creates a ManagedDataSource which obtains connections from the specified pool and manages them using the specified transaction registry. |
Method Summary | |
---|---|
java.sql.Connection |
getConnection()
Return a Connection from my pool,
according to the contract specified by ObjectPool.borrowObject() . |
void |
setTransactionRegistry(TransactionRegistry transactionRegistry)
Sets the transaction registry from the XAConnectionFactory used to create the pool. |
Methods inherited from class org.apache.commons.dbcp.PoolingDataSource |
---|
getConnection, getLoginTimeout, getLogWriter, isAccessToUnderlyingConnectionAllowed, isWrapperFor, setAccessToUnderlyingConnectionAllowed, setLoginTimeout, setLogWriter, setPool, unwrap |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagedDataSource()
public ManagedDataSource(ObjectPool pool, TransactionRegistry transactionRegistry)
pool
- the connection pooltransactionRegistry
- the transaction registry obtained from the
XAConnectionFactory used to create the connection pool object factoryMethod Detail |
---|
public java.sql.Connection getConnection() throws java.sql.SQLException
PoolingDataSource
Connection
from my pool,
according to the contract specified by ObjectPool.borrowObject()
.
getConnection
in interface javax.sql.DataSource
getConnection
in class PoolingDataSource
java.sql.SQLException
public void setTransactionRegistry(TransactionRegistry transactionRegistry)
transactionRegistry
- the transaction registry acquired from the XAConnectionFactory
used to create the pool
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |