java transaction — brief AR notes

a tx is often “managed” on the server. There’s one session per tx in server memory. But how is a XA tx managed??

a tx and a session always involve a private mem, often on server and client

a tx usually (always?) involves a SESSION. perhaps a session with the DB or MOM
a tx usually (always?) involves a java THREAD.
a tx always involves a private mem

“XA-enabled jdbc driver”?? I guess such a driver understands and responds to the commands of global tx mgr.

A Weblogic expert told me that the first phase can be lengthy as all parties fully prepare their commit and rollback infrastructure. It can fail. 2nd phase is extremely quick as the global tx mgr somehow triggers all parties (geographically distant) to perform the final step. Because this last step is extremely _simple_, it’s virtually impossible to fail.

Q: what if one of the parties fails during 2nd phase, while other parties commit.
A: looks like it is a technical possibility but known to be extremely unlikely.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s