public class StandardXAPoolDataSource extends StandardPoolDataSource
create : create an XAConnection
create(user,password) : create a PooledConnection with an other user/password
testThisObject : check if the object is still valid
checkThisObject : check if the object is closed
expire : kill the object
Modifier and Type | Field and Description |
---|---|
org.apache.commons.logging.Log |
glog |
javax.transaction.TransactionManager |
transactionManager |
javax.sql.XADataSource |
xads |
cpds, dataSourceName, ictx, jdbcTestStmt, onOff, pool
logWriter, password, user
Constructor and Description |
---|
StandardXAPoolDataSource()
Constructor
|
StandardXAPoolDataSource(int initSize)
Constructor
|
StandardXAPoolDataSource(StandardXADataSource ds)
Constructor
|
StandardXAPoolDataSource(StandardXADataSource ds,
int initSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
connectionClosed(javax.sql.ConnectionEvent event)
Invoked when the application calls close()
on its representation of the connection
|
GenerationObject |
create(java.lang.String _user,
java.lang.String _password) |
javax.sql.XADataSource |
getDataSource()
Getter for property dataSource.
|
java.lang.Object |
getObjectInstance(java.lang.Object refObj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
Methods inherited from ObjectFactory
|
javax.naming.Reference |
getReference()
Retrieves the Reference of this object.
|
void |
setDataSource(javax.sql.XADataSource dataSource)
Setter for property dataSource.
|
void |
setTransactionManager(javax.transaction.TransactionManager tm) |
boolean |
testThisObject(java.lang.Object o)
This method tests if a connection is valid or not.
|
java.lang.String |
toString() |
checkThisObject, connectionErrorOccurred, create, expire, getCheckLevelObject, getConnection, getConnection, getDataSourceName, getDeadLockMaxWait, getDeadLockRetryWait, getGeneration, getJdbcTestStmt, getLifeTime, getLockedObjectCount, getLogWriter, getMaxSize, getMinSize, getParentLogger, getSleepTime, getUnlockedObjectCount, isGC, isWrapperFor, setCheckLevelObject, setDataSourceName, setDeadLockMaxWait, setDeadLockRetryWait, setDebug, setGC, setGeneration, setJdbcTestStmt, setLifeTime, setLogWriter, setMaxSize, setMinSize, setSleepTime, setThreadFactory, shutdown, stopPool, unwrap
getDescription, getLoginTimeout, getPassword, getThreadFactory, getUser, isDebug, isVerbose, setDescription, setLoginTimeout, setPassword, setUser, setVerbose
public javax.sql.XADataSource xads
public javax.transaction.TransactionManager transactionManager
public org.apache.commons.logging.Log glog
public StandardXAPoolDataSource()
public StandardXAPoolDataSource(int initSize)
public StandardXAPoolDataSource(StandardXADataSource ds)
public StandardXAPoolDataSource(StandardXADataSource ds, int initSize)
public void setTransactionManager(javax.transaction.TransactionManager tm)
public void connectionClosed(javax.sql.ConnectionEvent event)
connectionClosed
in interface javax.sql.ConnectionEventListener
connectionClosed
in class StandardPoolDataSource
public GenerationObject create(java.lang.String _user, java.lang.String _password) throws java.sql.SQLException
create
in interface PoolHelper
create
in class StandardPoolDataSource
java.sql.SQLException
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class StandardPoolDataSource
javax.naming.NamingException
- If a naming exception was encountered while
retrieving the reference.public java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws java.lang.Exception
CoreDataSource
getObjectInstance
in interface javax.naming.spi.ObjectFactory
getObjectInstance
in class StandardPoolDataSource
java.lang.Exception
public javax.sql.XADataSource getDataSource()
public void setDataSource(javax.sql.XADataSource dataSource)
dataSource
- New value of property dataSource.public java.lang.String toString()
toString
in interface PoolHelper
toString
in class StandardPoolDataSource
public boolean testThisObject(java.lang.Object o)
testThisObject
in interface PoolHelper
testThisObject
in class StandardPoolDataSource