I used the following code to crash my running JBoss and then recover the transaction which was running in XA.
https://github.com/jboss-developer/jboss-eap-quickstarts