I think we should use the provided XID when enlisting the resources in the transaction.Currently we use the JBoss local id. Maybe it should be configurable?http://jira.jboss.com/jira/browse/JBAS-1431