If you are seriously considering using an XA transaction manager in your application, it is highly recommended to read Mike Spille's XA Exposed I, II and III.
Those blog posts summarize the most important things one should know about XA and - cherry on the cake - are quite pleasant to read.
A JavaWorld article has been written about XA transactions and Spring. It uses and briefly discusses BTM as well as other transaction managers. Examples with source code are provided.