2 Replies Latest reply on Feb 4, 2003 6:45 AM by Vance Maverick

    How does tx mgr handle non-XA JDBC drivers?

    Vance Maverick Newbie

      I'm looking for a pointer into the source code. Non-XA JDBC drivers don't expose a separate prepare() hook for the two-phase commit protocol. I understand in an abstract way how a two-phase transaction coordinator can manage one such driver (plus any number of two-phase-capable XAResource implementations), but I'd like to read the code to understand how JBoss handles this specifically. I'd appreciate even the name of the relevant package....

      Vance

      [I earlier posted this in the general persistence forum.]

        • 1. Re: How does tx mgr handle non-XA JDBC drivers?
          David Jencks Master

          It doesn't handle it, and the "1 phase commit optimization" doesn't work IMO since there is no way to recover from a failure between the time the single 1pc resource commits or rollbacks and the time the tm logs the participants.

          What we do is ignore the prepare phase on any 1pc-only resource manager. I used to log a warning every time this happened but I got too many complaints. The code is in the connector package in org.jboss.resource.connectionmanager.TxConnectionManager in the Local connection event listener class.

          • 2. Re: How does tx mgr handle non-XA JDBC drivers?
            Vance Maverick Newbie

            Thanks for the pointer. Just to be clear, by "1 phase commit optimization", you're referring to the strategy of committing the one-phase resource at the end of the prepare cycle and the beginning of the commit cycle? Indeed, that's not happening here.

            (I'm not sure I see how the failure you describe is different from other resource failures in the commit cycle, but that's a discussion for another time.)

            Vance