Download Application Program Interface Users` Manual
Transcript
JDBC Distributed Transaction Figure 6-5 ABPooledConnection Class <Interface> PooledConnection <Interface> XAConnection ABPooled Connection ABConnection instance returned by getConnection method acts as a temporary handle to the physical connection, and runs like common connection before participating in global transaction. If ABConnection instance participates in global transaction, auto-commit is specified as false. After global transaction terminates, auto-commit is restored to its original state prior to occurrence of global transaction. Each time an XAConnection instance getConnection method is called, it returns a new connection instance. It had been returned by the same XAConnection instance and closes any previous connection instance tha still exists. It is advisable to explicitly close any previous connection instance before opening a new one. Calling the close method of an XAConnection instance closes the physical connection to the database. XAResource Interface The TM uses ABXAResource instances to coordinate all the transaction branches. An Altibse.jdbc.driver.ABXAResource instance is an instance of a class that implements the javax.transaction.xa.XAResource interface. Figure 6-6 ABXAResource Class <Interface> javax.transaction .xa.XAResource ABXAResource The ALTIBASE JDBC driver creates and returns an ABXAResource instance whenever the ABPooledConnection class getXAResource method is called, and associates an ALTIBASE JDBC driver ABXARe107 XA Interface