1 Reply Latest reply on Nov 13, 2008 10:40 AM by Adrian Brock

    Optional JTA

    Adrian Brock Master

      A couple of the dependencies need to be reworked so JTA can be optional.

      * JCA

      CachedConnectionManager - This services depends directly on the TM
      so it can install it onto the TransactionSynchronizer
      (this should be done a different way) and the UserTransaction
      so it can listen for lazy enlistment (which should be optional).

      WorkManager - Need to test that transaction inflow can be turned off and
      fails gracefully when JTA is not present. i.e. getXATerminator() gives a reasonable
      error message

      * JBoss WEB

      Unfinished Transactions - There is a TomcatValve that checks for incomplete
      transactions. This needs making optional.

        • 1. Re: Optional JTA
          Adrian Brock Master

          I think I've figured out to do this now.
          i.e. make jta and jca lazy

          The changes are required are roughly:

          1) java:/UserTransaction, java:/TransactionSynchronizationRegistry

          These need to be replaced by something that bootstraps the UserTransaction (JTA implementation) on demand at first use.

          There's an issue with it doing this for the TSR:
          http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189120#4189120

          2) RAR Bootstrap Context

          The use of the XATerminator needs making lazy such that first use of the XATerminator
          bootstraps JTA

          3) CachedConnectionManager

          This needs changing such that the transaction manager is injected using
          an incallback with cardinality 0..1
          i.e. You can run the CCM without a transaction manager, but it can
          cutover to using one if it becomes available later

          4) Tomcat valves

          These need similar processing to the what is described above for the CCM,
          i.e. you can run them without the relevant service, but if something bootstraps it
          later they will start doing the extra processing.

          5) Testing and reasonable error messages when JCA and JTA is not
          even lazy/on-demand

          My first look at what would happen without JCA and JTA
          didn't give the message I expected. I expected to see a problem with
          accessing the UserTransaction but instead I got this:
          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=145579