5 Replies Latest reply on Nov 11, 2016 8:36 AM by Tom Jenkinson

    jdbc drivers behavior on calling XAResource.commit/prepare/rollback with unknown Xid

    Ondra Chaloupka Apprentice

      Hi guys,

       

      I get inspired by issue https://issues.jboss.org/browse/WFLY-7196 (The outcome of xa_commit call on non exiting transaction is silently ignored) and try to check behavior of `XAResource` implementation of jdbc drivers from databases that are supported by JBoss EAP.

       

      What I understood from the xa spec is that calling methods `XAResource.commit`, `XAResource.rollback` or `XAResource.prepare` with unknown `Xid` (unknown to the database) should cause `XAException.XAER_NOTA` being thrown.

       

      After testing jdbc drivers behavior I can see they do not follow the spec in several cases.

       

      Thus I would like ask

      • Do I understand the spec right or there is different possibility how to interpret it?
      • Could wrong behavior of jdbc drivers cause some troubles for Narayana's 2PC processing. I mean mainly different exception or different XAException error code is thrown, or ignoring to work with unknown Xid wholeover (as EJB remote XAResource does - WFLY-7196)?

       

      Thank you for your feedback

       

      Ondra