I'm working in one file system connector using JCA (Connector Architecture) to supports XA transations.
I have MyXAResource.java (singleton) to keep state of my operations in a hashmap, adding a list of operations executed to this hashmap where the key is the id of the transation(Xid). So, where commit(Xid) or rollback(Xid) is invoked on this interface I get the list of operations from the hashmap and complete or remove the actions I take over file system.
But when I'm executing one Interaction I can't know which transaction this execution belongs. How can I get the transaction id (Xid) when I'm executing an operation (on MyInteraction.java, implementsjavax.resource.cci.Iteraction). I need this to add this operation to the correct operation historic.