In TxXMLFileDescriptorStore, various parts do things like: activeTransactionBranch.set(txContext); but in the AbstractTXFileStore service, you get requests like... activeTransactionBranch.set(txId); - With completely different types. So, here's the question: Was it *intended* that TxXMLFileDescriptorStore would be overwriting the contents of activeTransactionBranch's thread local data with an object of a different type?
This is intended. Have a look at the different implementations of getActiveTxId() in both classes for an explanation.