Is there any sample code on how to use JBoss cache for application objects.
I believe this includes configuring the cache as a XA resource. Any guide lines as to how?
No, XA is not supported - for now. It is on the todo list.
For sample code, check out the testsuite examples. Some of them use a dummy TransactionManager. so you can run outside of the JBoss container.
I will *soon* provide a standalone package, to be used outside of the JBoss container, plus some documentation.