org.enhydra.jdbc.pool
Class StandardXAPoolDataSource
java.lang.Object
|
+--org.enhydra.jdbc.core.CoreDataSource
|
+--org.enhydra.jdbc.pool.StandardPoolDataSource
|
+--org.enhydra.jdbc.pool.StandardXAPoolDataSource
- All Implemented Interfaces:
- javax.sql.ConnectionEventListener, javax.sql.DataSource, java.util.EventListener, javax.naming.spi.ObjectFactory, PoolHelper, javax.naming.Referenceable, java.io.Serializable
- Direct Known Subclasses:
- JonasXAPoolDataSource
- public class StandardXAPoolDataSource
- extends StandardPoolDataSource
StandardXAPoolDataSource class allows to make some operations on
XAConnection. It implements PoolHelper for the 3 methods :
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
- See Also:
- Serialized Form
Method Summary |
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. |
javax.naming.Reference |
getReference()
Retrieves the Reference of this object. |
void |
initContext()
|
void |
setDataSource(javax.sql.XADataSource dataSource)
Setter for property dataSource. |
void |
setTransactionManager(javax.transaction.TransactionManager tm)
|
Methods inherited from class org.enhydra.jdbc.pool.StandardPoolDataSource |
checkThisObject, connectionErrorOccurred, create, expire, getCheckLevelObject, getConnection, getConnection, getDataSourceName, getDeadLockMaxWait, getDeadLockRetryWait, getGeneration, getJdbcTestStmt, getLifeTime, getLockedObjectCount, getLogWriter, getMaxSize, getMinSize, getSleepTime, getUnlockedObjectCount, isGC, setCheckLevelObject, setDataSourceName, setDeadLockMaxWait, setDeadLockRetryWait, setDebug, setGC, setGeneration, setJdbcTestStmt, setLifeTime, setLogWriter, setMaxSize, setMinSize, setSleepTime, setThreadFactory, shutdown, stopPool, testThisObject, toString |
Methods inherited from class org.enhydra.jdbc.core.CoreDataSource |
getDescription, getLoginTimeout, getObjectInstance, getPassword, getThreadFactory, getUser, isDebug, isVerbose, log, setDescription, setLoginTimeout, setPassword, setUser, setVerbose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.sql.DataSource |
getLoginTimeout, setLoginTimeout |
xads
public javax.sql.XADataSource xads
transactionManager
public javax.transaction.TransactionManager transactionManager
StandardXAPoolDataSource
public StandardXAPoolDataSource()
- Constructor
StandardXAPoolDataSource
public StandardXAPoolDataSource(int initSize)
- Constructor
setTransactionManager
public void setTransactionManager(javax.transaction.TransactionManager tm)
initContext
public void initContext()
throws java.sql.SQLException
- Overrides:
initContext
in class StandardPoolDataSource
connectionClosed
public void connectionClosed(javax.sql.ConnectionEvent event)
- Invoked when the application calls close()
on its representation of the connection
- Overrides:
connectionClosed
in class StandardPoolDataSource
create
public GenerationObject create(java.lang.String _user,
java.lang.String _password)
throws java.sql.SQLException
- Overrides:
create
in class StandardPoolDataSource
getReference
public javax.naming.Reference getReference()
throws javax.naming.NamingException
- Retrieves the Reference of this object. Used at binding time by JNDI
to build a reference on this object.
- Overrides:
getReference
in class StandardPoolDataSource
- Returns:
- The non-null Reference of this object.
- Throws:
javax.naming.NamingException
- If a naming exception was encountered while
retrieving the reference.
getDataSource
public javax.sql.XADataSource getDataSource()
- Getter for property dataSource.
- Returns:
- Value of property dataSource.
setDataSource
public void setDataSource(javax.sql.XADataSource dataSource)
- Setter for property dataSource.
- Parameters:
dataSource
- New value of property dataSource.