0 Replies Latest reply on Jun 18, 2009 9:16 AM by Jean-Paul Homma

    OC4J Transaction Level is set to "Global & Local Transaction problem

    Jean-Paul Homma Newbie
      Hi,

      I create a method:
      and start with
      ...
      User Transaction transaction = Transaction.instance();
      transaction.begin();

      Calling another method in another class which performs the actual work.
      ---------------------------------------------------------
              Another class:

              @In(create = true)
              private EntityManager entityManager;

              Another method:

              ...
              Work
              ..
              entityManager.persist(aEnity);
              entityManager.flush();

      ---------------------------------------------------------
      transaction.commit();


      Behavior:
      When the oc4j Transaction Level is set to "Local Transaction " the entityManager.flush(); commits the data to the database.
      When the oc4j Transaction Level is set to "Global & Local Transaction " the entityManager.flush(); does not commits the data to the database but the transaction.commit(); does .


      Can anyone explain this behavior?
      |

      ``

      |