I ran derbyall and suites.All.
In derbyall the wisconsin test failed which is happening also on daily tests.
In suites.All the lang.LangScripts test failed. The same failure occurs to me also on plain trunk. I have posted details to derby-dev.
Except the messages being logged I also changed to code in DRDAXAProtocol that it will indirectly use the XATransactionState.cancel method to cancel the transaction. This will lead to the atomic transaction disassociation and rollback being performed in one synchronized block on the corresponding XATransactionState instance.
The best way which I found to do that is to add a method cancelXATransaction to ResourceAdapter which will find the appropriate XATransactionState instance and will call the cancel method. The reference to the ResourceAdapter is kept in drda.XADatabase object instance.