2 Replies Latest reply on Jul 12, 2007 11:11 AM by Kevin Pauli

    How to switch from JTA to  JTS in JBoss AS 4.2.0.GA?

    Kevin Pauli Newbie

      By default JBoss AS 4.2.0.GA comes with JBoss Transactions configured to use JTA. I would like to switch it to JTS in order to get XA support for database activity and JMS message creation in one atomic transaction.

      But the JBoss Transactions installation guide at
      http://labs.jboss.com/jbosstm/docs/4.2.3/manuals/pdf/InstallGuide.pdf seems to be assuming a standalone installation (i.e., outside of JBoss AS) so makes no mention of JBoss AS.

      And the JBoss AS installation guide at http://docs.jboss.com/jbossas/guides/installguide/r1/en/pdf/jboss4-install.pdf makes no mention of JTS!

      So I'm looking for some kind of document that "bridges the gap" between the two and tells me how to configure JBoss Transactions within JBoss AS.

      Thanks for any info.

        • 1. Re: How to switch from JTA to  JTS in JBoss AS 4.2.0.GA?
          Jonathan Halliday Master

          > I would like to switch it to JTS in order to get XA support for database activity and JMS message creation in one atomic transaction.

          You don't need JTS for that unless you are using more than one JBoss instance. If the database and JMS are communicated to from the same JBoss server then JTA is sufficient.

          No JTS is currently available for AS 4.2, as it's got a new ORB that we don't yet support. I hope to have the first JBossTS 4.4 beta out shortly to address this.

          • 2. Re: How to switch from JTA to  JTS in JBoss AS 4.2.0.GA?
            Kevin Pauli Newbie

             

            "jhalliday" wrote:
            > You don't need JTS for that unless you are using more than one JBoss instance.


            Then I must be doing something wrong or have a bad misconception.

            I have a transaction in which I write some rows to the database and send a JMS message. Sometimes I am getting a race condition where the MDB that is recieving the message fires up and looks in the database and can't find the new rows; the original transaction is not committed yet. If I step through in debug mode, or make the MDB sleep for a couple seconds before hitting the database, the race condition goes away.

            I thought the whole point of having JMS participate in a transaction was so that the message would not be placed on the queue (and therefore not be consumed by the receiving MDB) until the transaction was complete?

            (BTW, my JMS provider is JBossMQ, which is the default configured for JBoss AS 4.2.0.GA. would switching to JBoss Messaging make a difference?)