0 Replies Latest reply on Jun 18, 2009 9:16 AM by homma1

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

    homma1
      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?
      |

      ``

      |