-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[EMAIL PROTECTED] wrote:
> I am trying to find documentation on how to use the new Distributed 
> Transactions (XA) feature without going through a JDBC driver. According 
> to a Webinar I just reviewed, the XA protocols are "available in the SQL 
> layer" but I am having the hardest time finding documentation on how to 
> initiate, complete, or abort a two-phase commit.  Can anyone help? 
> 
> I would rather NOT crawl the source code and reverse engineer the 
> statements that way, if that's OK with you.  Are there any docs online yet 
> on how to do this outside of a JDBC driver?
> 
> Thanks!
> 
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine

Shawn,

It's pretty straightforward (if you know XA). I'll give you the syntax
that the JDBC driver uses, if you don't know XA let me know and I'll
explain further (it's late here, and I haven't been away from the
computer all day):

The following SQL statements map directly to their counterparts in XA,
where XID can be represented in the following way:

GTRID, BQAUL, FORMATID (I use 0x.... hex notation for each, where GTRID
is the global transaction ID, BQUAL is the branch qualifier (both are up
to 64 bytes in length, the only requirement is that the combination of
the two be globally unique), and FORMATID is a 32-bit integer).

XA PREPARE XID

XA ROLLBACK XID

XA END [SUSPEND] XID (suspended tx can only be resumed on same physical
connection)

XA START XID [JOIN|RESUME]

XA COMMIT XID [ONE PHASE]

You (well, really, your transaction mananger) issue these commands as
you would any other SQL query.

        -Mark

- --
Mark Matthews
MySQL AB, Software Development Manager - Connectivity
www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC5uwytvXNTca6JD8RAsAZAJ4qsxPQhOZwnOovHR0kwSdDI+5MGACgo/yV
//dYu3u4yVelbDsNuP9OGhA=
=QtAd
-----END PGP SIGNATURE-----

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to