org.enhydra.jdbc.standard
Class StandardXAConnectionHandle

java.lang.Object
  extended byorg.enhydra.jdbc.util.JdbcUtil
      extended byorg.enhydra.jdbc.core.CoreConnection
          extended byorg.enhydra.jdbc.standard.StandardConnectionHandle
              extended byorg.enhydra.jdbc.standard.StandardXAConnectionHandle
All Implemented Interfaces:
java.sql.Connection

public class StandardXAConnectionHandle
extends StandardConnectionHandle


Field Summary
 boolean thisAutoCommit
           
 javax.transaction.TransactionManager transactionManager
           
 javax.transaction.Transaction tx
           
 StandardXAConnection xacon
           
 
Fields inherited from class org.enhydra.jdbc.standard.StandardConnectionHandle
inUse, isReallyUsed, masterPrepStmtCache, preparedStatementCache
 
Fields inherited from class org.enhydra.jdbc.core.CoreConnection
con
 
Fields inherited from class org.enhydra.jdbc.util.JdbcUtil
log
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
StandardXAConnectionHandle(StandardXAConnection pooledCon, java.util.Hashtable preparedStatementCache, int preparedStmtCacheSize, javax.transaction.TransactionManager tm)
          Constructor
 
Method Summary
 void close()
          Closes this StandardConnectionHandle and prevents it from being reused.
 void commit()
           
 java.sql.Statement createStatement()
           
 java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency)
           
 java.sql.CallableStatement prepareCall(java.lang.String sql)
          Creates a CallableStatement for the given SQL
 java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
          Creates a CallableStatement for the given SQL, result set type and concurency
 java.sql.PreparedStatement prepareStatement(java.lang.String sql)
          Creates a PreparedStatement for the given SQL.
 java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
          Creates a PreparedStatement for the given SQL, type and concurrency.
 void rollback()
           
 void setAutoCommit(boolean autoCommit)
           
 void setTransactionManager(javax.transaction.TransactionManager tm)
           
 java.lang.String toString()
           
 
Methods inherited from class org.enhydra.jdbc.standard.StandardConnectionHandle
catchInvoke, createPreparedStatement, isClosed, preInvoke, setupPreparedStatementCache
 
Methods inherited from class org.enhydra.jdbc.core.CoreConnection
clearWarnings, createStatement, getAutoCommit, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isReadOnly, nativeSQL, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
 
Methods inherited from class org.enhydra.jdbc.util.JdbcUtil
setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

transactionManager

public javax.transaction.TransactionManager transactionManager

tx

public javax.transaction.Transaction tx

xacon

public StandardXAConnection xacon

thisAutoCommit

public boolean thisAutoCommit
Constructor Detail

StandardXAConnectionHandle

public StandardXAConnectionHandle(StandardXAConnection pooledCon,
                                  java.util.Hashtable preparedStatementCache,
                                  int preparedStmtCacheSize,
                                  javax.transaction.TransactionManager tm)
Constructor

Method Detail

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager tm)

close

public void close()
           throws java.sql.SQLException
Description copied from class: StandardConnectionHandle
Closes this StandardConnectionHandle and prevents it from being reused. It also returns used PreparedStatements to the PreparedStatement cache and notifies all listeners.

Specified by:
close in interface java.sql.Connection
Overrides:
close in class StandardConnectionHandle
Throws:
java.sql.SQLException

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws java.sql.SQLException
Specified by:
setAutoCommit in interface java.sql.Connection
Overrides:
setAutoCommit in class CoreConnection
Throws:
java.sql.SQLException

commit

public void commit()
            throws java.sql.SQLException
Specified by:
commit in interface java.sql.Connection
Overrides:
commit in class CoreConnection
Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
Specified by:
rollback in interface java.sql.Connection
Overrides:
rollback in class CoreConnection
Throws:
java.sql.SQLException

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
                                            throws java.sql.SQLException
Creates a PreparedStatement for the given SQL. If possible, the statement is fetched from the cache.

Specified by:
prepareStatement in interface java.sql.Connection
Overrides:
prepareStatement in class StandardConnectionHandle
Throws:
java.sql.SQLException

prepareStatement

public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                   int resultSetType,
                                                   int resultSetConcurrency)
                                            throws java.sql.SQLException
Creates a PreparedStatement for the given SQL, type and concurrency. If possible, the statement is fetched from the cache.

Specified by:
prepareStatement in interface java.sql.Connection
Overrides:
prepareStatement in class StandardConnectionHandle
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws java.sql.SQLException
Creates a CallableStatement for the given SQL, result set type and concurency

Specified by:
prepareCall in interface java.sql.Connection
Overrides:
prepareCall in class StandardConnectionHandle
Throws:
java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall(java.lang.String sql)
                                       throws java.sql.SQLException
Creates a CallableStatement for the given SQL

Specified by:
prepareCall in interface java.sql.Connection
Overrides:
prepareCall in class CoreConnection
Throws:
java.sql.SQLException

createStatement

public java.sql.Statement createStatement()
                                   throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Overrides:
createStatement in class CoreConnection
Throws:
java.sql.SQLException

createStatement

public java.sql.Statement createStatement(int resultSetType,
                                          int resultSetConcurrency)
                                   throws java.sql.SQLException
Specified by:
createStatement in interface java.sql.Connection
Overrides:
createStatement in class CoreConnection
Throws:
java.sql.SQLException

toString

public java.lang.String toString()