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

com.mysql.jdbc.jdbc2.optional
Class JDBC4SuspendableXAConnection

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

public class JDBC4SuspendableXAConnection
extends SuspendableXAConnection


Field Summary
 
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
JDBC4SuspendableXAConnection(ConnectionImpl connection)
           
 
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.SuspendableXAConnection
commit, end, forget, getConnection, getInstance, getTransactionTimeout, getXAResource, isSameRM, prepare, 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

JDBC4SuspendableXAConnection

public JDBC4SuspendableXAConnection(ConnectionImpl connection)
                             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 SuspendableXAConnection
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 SuspendableXAConnection
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 SuspendableXAConnection
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