Why aren\'t nested transactions supported by JTA? Is it because of the complexity of implementing them (which I doubt) or some design principle?
JTA specification is not saying that the it doesn't support the nested transactions - it just doesn't require the implementors to support it.
Following excerpts are taken from the JTA 1.1 spec:
p. 11, 13; 3.1 UserTransaction interface and 3.2 TransactionManager interface
"Support for nested tranactions is not required."
p. 13, 3.2.1 Starting a Transaction
"If the Transaction Manager implementation does not support nested transactions, the TransactionManager.begin method throws the NotSupportedException when the calling thread is already associated with a transaction."
There might be actually a problem with the XAResource that you might try enlisting with the current transaction (I believe it might be related with the X/Open XA specification):
3.4.4 Transaction Association
XAResource does not support nested transactions. It is an error for the XAResource.start method to be invoked on a connection that is currently associated with a different transaction.