Try killing the OTHER session... :-)

An ordered pair of commits can behave like a two phase commit in one
direction...

//pseudocode
try {
TX1.commit()  // will/should NOT be rolled back if TX2 fails to commit.
TX2.commit()  // will be rolled back if TX1 fails to commit.
} catch {
  TX1.rollback()
  TX2.rollback()
}

On Fri, Aug 1, 2008 at 11:52 AM, SonyRaymond <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I have just tried to use Ibatis 2.2 to test a single point of transaction
> with committing to
> two different databases (Sybase and MSSQL 2000) for some testings. My test
> program loads
> the two JDBC drivers (those non-XA type) and it really works (at the moment
> of daoManager.commitTransaction(), I killed the MSSQL Server session and it
> really rollbacked
> both transactions).
>
> I am really amazing and found surprised, because I studied in university
> that a single of transaction
> with committing to more than one databases, it should require the
> combination of two-phase commits
> protocols and a transaction manager. XA type JDBC Driver should be used for
> two-phase commit
> protocol. And I think Ibatis can work as a role of transaction manager, but
> why using non-XA type
> JDBC driver can also do the same job.
>
> Hope some database experts refresh my concept.
>
> Thanks a lot,
> Raymond
>
> --
> View this message in context:
> http://www.nabble.com/why-Ibatis-2.2-can-handle-multi-db-transactions-with-normla-JDBC-driver-tp18779667p18779667.html
> Sent from the iBATIS - Dev mailing list archive at Nabble.com.
>
>

Reply via email to