1 Reply Latest reply on Jun 22, 2004 4:51 PM by duslow

    prepare called on a local tx

      Using JBoss 3.2.3 and Oracle 8.1.7, I have an MDB receiving messages from a Queue. Within the onMessage() method, I am making a call on an EJB, where the transaction attribute is set to "RequiresNew".

      The MDB is set with acknowledge-mode="auto", destination-type="queue", transaction="contrainer", transaction-type="required"

      I am getting the following error:

      2004-06-22 11:44:54,146 WARN (TxConnectionManager.java:801) Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.

      Lot of topics in this forum suggest that I enable XA support on the Oracle. We really dont want to use the XA Transaction for various reasons.

      So, the question is how to make the JMS use local transactions in the scenario mentioned above? The JMS FAQ does not address this scenario.

      Thanks
      Kiran


        • 1. Re: prepare called on a local tx
          duslow

          You are using local transactions which is exactly why you are getting the warning. This has been discussed many different times on this forum.

          RequiresNew will not prevent the warning you are seeing either. You are branching the local transaction and as such, your database operations will not rollback if the JMS side of the transaction were to fail. If you want the database to rollback in the even of a JMS related failure, then use Requires instead of RequiresNew on your EJB.

          Even in this case however, since you are not using XA, you do not have 100% ACIDic semantics, which is exactly what the warning is telling you.