-
1. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
dmlloyd Oct 4, 2011 11:32 AM (in response to tomjenkinson)I agree that the question of exception mapping is very relevant. I just want to point out that we are not planning on exposing a remote interface sort of view for TransactionManager. It's actually happening over the wire. So implementation-wise we'll probably ship over a one-byte code or something which corresponds to the exception thrown. Then on the client side we'd map the code to the XAResource exception. Since the XAResource side is the lossy side we'd ship over the maximally detailed error code from the server and then pare it down on the client, to future-proof against future, better client APIs.
In other words, the try/catch blocks you illustrate won't actually literally exist anywhere.
-
2. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
tomjenkinson Oct 4, 2011 11:37 AM (in response to dmlloyd)Hi David,
I appreciate that totally, but the issue will still arise even if its more a case of:
sendRemotingRequest("commit");
byte response = receiveRemotingResponse();
switch (response) {
case 3:
throw new XAException(XAException.XAER_PROTO);
/// etc
}
-
3. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
dmlloyd Oct 4, 2011 11:37 AM (in response to tomjenkinson)Right, the question is definitely relevant.
-
4. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
marklittle Oct 5, 2011 10:17 AM (in response to tomjenkinson)1 of 1 people found this helpfulDon't duplicate work that's already done and make sure new work is consistent with work that's already done . So check out what we're doing within subordinate implementations, which already have this mapping problem. Look at the JTAX and JTS implementations as examples.
-
5. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
tomjenkinson Oct 5, 2011 10:27 AM (in response to marklittle)Will do, but this issue is because we are relaying transaction completion information via an XAResource and so losing some precision, I guess JTS doesn't need to do that? Will check though...
-
6. Re: Remote Tx Inflow: Proxying a transaction as an XAResource issue
tomjenkinson Oct 17, 2011 5:37 PM (in response to tomjenkinson)Following Marks excellent advice, and after finally getting a prototype implemented I discovered that this very issue is already resolved for us by JCA.
You can see the recommended approach in: https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/tests/classes/com/arjuna/ats/jta/distributed/server/impl/ServerImpl.java -r 37580
You can see the implementations of commit and rollback that do XAException acceptable mappings at: https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_15_0_Final/ArjunaJTA/jta/classes/com/arjuna/ats/internal/jta/transaction/arjunacore/jca/XATerminatorImple.java -r 37579