|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.dbcp.managed.DataSourceXAConnectionFactory
public class DataSourceXAConnectionFactory
An implementation of XAConnectionFactory which uses a real XADataSource to obtain connections and XAResources.
Field Summary | |
---|---|
protected String |
password
|
protected TransactionRegistry |
transactionRegistry
|
protected String |
username
|
protected XADataSource |
xaDataSource
|
Constructor Summary | |
---|---|
DataSourceXAConnectionFactory(TransactionManager transactionManager,
XADataSource xaDataSource)
Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database connections. |
|
DataSourceXAConnectionFactory(TransactionManager transactionManager,
XADataSource xaDataSource,
String username,
String password)
Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database connections. |
Method Summary | |
---|---|
Connection |
createConnection()
Create a new Connection in an
implementation specific fashion. |
TransactionRegistry |
getTransactionRegistry()
Gets the TransactionRegistry for this connection factory which contains a the XAResource for every connection created by this factory. |
String |
getUsername()
Gets the username used to authenticate new connections. |
void |
setPassword(String password)
Sets the password used to authenticate new connections. |
void |
setUsername(String username)
Sets the username used to authenticate new connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TransactionRegistry transactionRegistry
protected XADataSource xaDataSource
protected String username
protected String password
Constructor Detail |
---|
public DataSourceXAConnectionFactory(TransactionManager transactionManager, XADataSource xaDataSource)
transactionManager
- the transaction manager in which connections will be enlistedxaDataSource
- the data source from which connections will be retrievedpublic DataSourceXAConnectionFactory(TransactionManager transactionManager, XADataSource xaDataSource, String username, String password)
transactionManager
- the transaction manager in which connections will be enlistedxaDataSource
- the data source from which connections will be retrievedusername
- the username used for authenticating new connections or null for unauthenticatedpassword
- the password used for authenticating new connectionsMethod Detail |
---|
public String getUsername()
public void setUsername(String username)
username
- the username used for authenticating the connection or null for unauthenticatedpublic void setPassword(String password)
password
- the password used for authenticating the connection or null for unauthenticatedpublic TransactionRegistry getTransactionRegistry()
XAConnectionFactory
getTransactionRegistry
in interface XAConnectionFactory
public Connection createConnection() throws SQLException
ConnectionFactory
Connection
in an
implementation specific fashion.
createConnection
in interface ConnectionFactory
createConnection
in interface XAConnectionFactory
Connection
SQLException
- if a database error occurs creating the connection
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |