I will enumerate my questions:
1 - When application server will use XAResource (one phase commit optimization or two phase commit), and in what cases it will use Local Transaction?
2 - I implemented my own client interface in my R.A., and when I use it, the jboss insists in use LocalTransaction. I already put XATransaction in my *-ds.xml, but this doesnt work. When i change my own client interface by common client interface (CCI) jboss uses XAResource, but commits with one phase. What I want to know is: what logic jboss uses to use Local Transaction or XAResource with one phase or two phase?