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

com.mysql.jdbc.jdbc2.optional
Class SuspendableXAConnection

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

public class SuspendableXAConnection
extends MysqlPooledConnection
implements javax.sql.XAConnection, javax.transaction.xa.XAResource


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
SuspendableXAConnection(Connection connection)
           
 
Method Summary
 void close()
          Invoked by the container (not the client), and should close the physical connection.
 void commit(javax.transaction.xa.Xid xid, boolean arg1)
           
 void end(javax.transaction.xa.Xid xid, int arg1)
           
 void forget(javax.transaction.xa.Xid xid)
           
 java.sql.Connection getConnection()
          Invoked by the container.
 int getTransactionTimeout()
           
 javax.transaction.xa.XAResource getXAResource()
           
 boolean isSameRM(javax.transaction.xa.XAResource xaRes)
           
 int prepare(javax.transaction.xa.Xid xid)
           
 javax.transaction.xa.Xid[] recover(int flag)
           
 void rollback(javax.transaction.xa.Xid xid)
           
 boolean setTransactionTimeout(int arg0)
           
 void start(javax.transaction.xa.Xid xid, int arg1)
           
 
Methods inherited from class com.mysql.jdbc.jdbc2.optional.MysqlPooledConnection
addConnectionEventListener, callListener, getConnection, 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

SuspendableXAConnection

public SuspendableXAConnection(Connection connection)
Method Detail

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws java.sql.SQLException
Specified by:
getXAResource in interface javax.sql.XAConnection
Throws:
java.sql.SQLException

commit

public void commit(javax.transaction.xa.Xid xid,
                   boolean arg1)
            throws javax.transaction.xa.XAException
Specified by:
commit in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

end

public void end(javax.transaction.xa.Xid xid,
                int arg1)
         throws javax.transaction.xa.XAException
Specified by:
end in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

forget

public void forget(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Specified by:
forget in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

getTransactionTimeout

public int getTransactionTimeout()
                          throws javax.transaction.xa.XAException
Specified by:
getTransactionTimeout in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

isSameRM

public boolean isSameRM(javax.transaction.xa.XAResource xaRes)
                 throws javax.transaction.xa.XAException
Specified by:
isSameRM in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

prepare

public int prepare(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Specified by:
prepare in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

recover

public javax.transaction.xa.Xid[] recover(int flag)
                                   throws javax.transaction.xa.XAException
Specified by:
recover in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

rollback

public void rollback(javax.transaction.xa.Xid xid)
              throws javax.transaction.xa.XAException
Specified by:
rollback in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

setTransactionTimeout

public boolean setTransactionTimeout(int arg0)
                              throws javax.transaction.xa.XAException
Specified by:
setTransactionTimeout in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

start

public void start(javax.transaction.xa.Xid xid,
                  int arg1)
           throws javax.transaction.xa.XAException
Specified by:
start in interface javax.transaction.xa.XAResource
Throws:
javax.transaction.xa.XAException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from class: MysqlPooledConnection
Invoked by the container. Return a logicalHandle object that wraps a physical connection.

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

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()

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