I forgot to provide information on the JBoss version: it's 3.2.2RC1
There is much debate about this.
The spec is contradictory.
for ResourceManagers that do not support reusing a suspended
XA connection in a different transaction before it is committed.
Our interpretation of the spec is that it should support it.
It is the XAResource that should not be resused.
Each new XID should create a new XAResource and
different XIDs should not be active on the same connection
at the same time.
This gives you the full performance benefit of XA connection
start XID1 (connection is XID1 XAResource1)
suspend XID1 (connection has no XID so return to the pool)
start XID2 (connection is XID2 XAResource2)
commit XID1 (acts on XAResource1)
commit XID2 (acts on XAResource2)
can all be done on one connection rather than one for each XID
In my experience few XA implements support this optimization.