MySQL Connector/J size='-1'>5.1.6

com.mysql.jdbc.jdbc2.optional
Class JDBC4MysqlXAConnection

java.lang.Object
  extended by com.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
      extended by com.mysql.jdbc.jdbc2.optional.MysqlXAConnection
          extended by com.mysql.jdbc.jdbc2.optional.JDBC4MysqlXAConnection
All Implemented Interfaces:
javax.sql.PooledConnection, javax.sql.XAConnection, javax.transaction.xa.XAResource

public class JDBC4MysqlXAConnection
extends MysqlXAConnection


Field Summary
 
Fields inherited from class com.mysql.jdbc.jdbc2.optional.MysqlXAConnection
logXaCommands
 
Fields inherited from class com.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
CONNECTION_CLOSED_EVENT, CONNECTION_ERROR_EVENT
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
JDBC4MysqlXAConnection(ConnectionImpl connection, boolean logXaCommands)
           
 
Method Summary
 void addStatementEventListener(javax.sql.StatementEventListener listener)
          Registers a StatementEventListener with this PooledConnection object.
 void close()
          Invoked by the container (not the client), and should close the physical connection.
 void removeStatementEventListener(javax.sql.StatementEventListener listener)
          Removes the specified StatementEventListener from the list of components that will be notified when the driver detects that a PreparedStatement has been closed or is invalid.
 
Methods inherited from class com.mysql.jdbc.jdbc2.optional.MysqlXAConnection
commit, end, forget, getConnection, getInstance, getTransactionTimeout, getXAResource, isSameRM, mapXAExceptionFromSQLException, prepare, recover, recover, rollback, setTransactionTimeout, start
 
Methods inherited from class com.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
addConnectionEventListener, callConnectionEventListeners, getConnection, getInstance, removeConnectionEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.PooledConnection
addConnectionEventListener, removeConnectionEventListener
 

Constructor Detail

JDBC4MysqlXAConnection

public JDBC4MysqlXAConnection(ConnectionImpl connection,
                              boolean logXaCommands)
                       throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

close

public void close()
           throws java.sql.SQLException
Description copied from class: MysqlPooledConnection
Invoked by the container (not the client), and should close the physical connection. This will be called if the pool is destroyed or the connectionEventListener receives a connectionErrorOccurred event.

Specified by:
close in interface javax.sql.PooledConnection
Overrides:
close in class MysqlPooledConnection
Throws:
java.sql.SQLException
See Also:
java.sql.DataSource#close()

addStatementEventListener

public void addStatementEventListener(javax.sql.StatementEventListener listener)
Registers a StatementEventListener with this PooledConnection object. Components that wish to be notified when PreparedStatements created by the connection are closed or are detected to be invalid may use this method to register a StatementEventListener with this PooledConnection object.

Specified by:
addStatementEventListener in interface javax.sql.PooledConnection
Overrides:
addStatementEventListener in class MysqlXAConnection
Parameters:
listener - an component which implements the StatementEventListener interface that is to be registered with this PooledConnection object

Since:
1.6

removeStatementEventListener

public void removeStatementEventListener(javax.sql.StatementEventListener listener)
Removes the specified StatementEventListener from the list of components that will be notified when the driver detects that a PreparedStatement has been closed or is invalid.

Specified by:
removeStatementEventListener in interface javax.sql.PooledConnection
Overrides:
removeStatementEventListener in class MysqlXAConnection
Parameters:
listener - the component which implements the StatementEventListener interface that was previously registered with this PooledConnection object

Since:
1.6

MySQL Connector/J size='-1'>5.1.6