Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-794

issues with closing/opening entity manager (slices) (can't seem to be able to create multiple entityManagers )

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.0-M1
    • 2.0.0-M1
    • slice
    • None

    Description

      So, for each of my web requests I open an entitymanager at the begining, and close it at the end, something like this:

      EntityManager pm = pmf.createEntityManager();
      try {
      chain.filter(...);
      }
      finally {
      pm.close();
      }

      And this works perfectly without slices. But when I turn on slices, this fails. The first request works fine, but the second requests complains that the EntityManager has already been closed. So it seems to be caching the EntityManager from the previous request... can someone please help me figure out how to fix this??

      I'll attach the log.

      Attachments

        1. log.txt
          413 kB
          Fernando Padilla

        Activity

          People

            ppoddar@apache.org Pinaki Poddar
            fern Fernando Padilla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: