You can begin experimenting with the XML Transaction component of JBoss 4.2.2 by editing the sample application source code, which is heavily commented to assist your understanding. The source code can be found in the <jbossts 4.2.2 install>/wst/demo/src directory.
It is structured as follows: