2 Replies Latest reply on May 13, 2003 7:03 AM by ben holland

    transaction query

    ben holland Newbie

      I am executing a transaction that interacts with several CMP beans on mysql and a BMP bean on Ingres.
      The BMP bean is read only (no code in the write method).
      When executing the transaction we get the following error.

      10:28:27,531 WARN [LocalTxConnectionManager$LocalConnectionEventListener] prepa
      re called on a local tx. You are not getting the semantics you expect!
      10:28:27,531 WARN [LocalTxConnectionManager$LocalConnectionEventListener] prepa
      re called on a local tx. You are not getting the semantics you expect!
      10:38:56,031 INFO [STDOUT] ejbPassivate () called.
      10:38:56,031 INFO [STDOUT] unsetEntityContext called

      My assumption is that JBoss is trying to do a commit on the ingres connection and ingres is telling it to get lost. Is this typical? Am I right?

      Thanks.

        • 1. Re: transaction query
          Kayvan Mojarrad Newbie

          Are you using CMT or BMT?
          I must say I don't really know what it means but I've had exactly the same warning before.
          I got rid of it by explicitly de-marking the transaction.
          Of coarse this can only be done in a BMT environment:

          EJBContext context;
          try {
          UserTransaction tx = context.getUserTransaction();
          tx.begin();
          ////////////////////
          transaction code
          ////////////////////
          try {
          tx.commit();
          } catch(Exception e) {
          throw e;
          }
          } catch(Exception e) {
          if (tx != null) {
          try {
          tx.rollback();
          } catch(SystemException se) {} // do nothing as this is the system confimaing the rolback
          }
          }

          I would really like to know exactly why this happens - so I'll keep my eyes on this thread in the hope that one of the gurus out there explains it.

          kv.

          • 2. Re: transaction query
            ben holland Newbie

            CMT.
            I was wondering if I could opt that bean out of
            the transaction but I think I may have to go for BMT and do the call outside the transaction.