Thursday, June 15, 2006

EDA Lessons Learned - Transactions

See EDA Lessons Learned for the list

I'm not doing much (ok any) 2PC (two-phased commit) these days. I used to be pretty hip on XA in the Java world. I still run into people that yell at me about XA. Perhaps I wear size 16 burgundies (clown reference for the un-indoctrinated).

XA is great in theory and fun to drop in meetings (not quite as fun as 2PC), but:

  • Slow (sync to disc)
  • Expensive (resources)
  • Complex
  • Implementations often buggy
  • Not always easy to find XA impls (try VSE mainframe)
It isn't perfect, but pseudo 2PC works pretty well:
  • JMS transaction + JDBC
  • Compensating transaction if necessary
Here is a good write up on the topic.


Sarge said...

Every time I tried to find the XA spec, the only way to get it was to pay a hundo or more to buy it. Proprietary protocols are just as bad whether they are encryption or transaction protocols. I fart in your general direction, XA.

zpope said...

XA (when you can find a copy) is an OK reference. I worked on BTP for OASIS and would say that BTP tried to provide an OSI type reference for service based transactionality. That is it defined aspects or levels of transactionality that could be used or not based on the specific need.

It is freely available from OASIS thru the following link (it's well hidden otherwis)