org.apache.aries.transaction.jdbc
Class XADatasourceEnlistingWrapper
java.lang.Object
org.apache.aries.transaction.jdbc.XADatasourceEnlistingWrapper
- All Implemented Interfaces:
- Serializable, Wrapper, CommonDataSource, DataSource
public class XADatasourceEnlistingWrapper
- extends Object
- implements DataSource, Serializable
This class allows JDBC XA data sources to participate in global transactions,
via the ConnectionWrapper
that is returned. The only service provided
is enlistment/delistment of the associated XAResource
in transactions.
Important consideration such as connection pooling and error handling are
completely ignored.
- See Also:
- Serialized Form
XADatasourceEnlistingWrapper
public XADatasourceEnlistingWrapper()
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface CommonDataSource
- Throws:
SQLException
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface CommonDataSource
- Throws:
SQLException
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter
in interface CommonDataSource
- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout
in interface CommonDataSource
- Throws:
SQLException
setDataSource
public void setDataSource(XADataSource dsToWrap)
setTxManager
public void setTxManager(TransactionManager txMgr)
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
isWrapperFor
public boolean isWrapperFor(Class<?> arg0)
throws SQLException
- Specified by:
isWrapperFor
in interface Wrapper
- Throws:
SQLException
unwrap
public <T> T unwrap(Class<T> arg0)
throws SQLException
- Specified by:
unwrap
in interface Wrapper
- Throws:
SQLException
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.