org.apache.aries.transaction.jdbc
Class XADatasourceEnlistingWrapper

java.lang.Object
  extended by 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

Constructor Summary
XADatasourceEnlistingWrapper()
           
 
Method Summary
 boolean equals(Object other)
           
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
 int hashCode()
           
 boolean isWrapperFor(Class<?> arg0)
           
 void setDataSource(XADataSource dsToWrap)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setTxManager(TransactionManager txMgr)
           
<T> T
unwrap(Class<T> arg0)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XADatasourceEnlistingWrapper

public XADatasourceEnlistingWrapper()
Method Detail

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.