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

Memory leak when using OpenJPAPersistence.cast(em)?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 2.3.0
    • None
    • None
    • None

    Description

      I have noticed a memory leak when using the following code on Glassfish J2EE server 3.1, however suspect the issue is not related to Glassfish.

      OpenJPAEntityManager kem = OpenJPAPersistence.cast(emNoTran);
      kem.getFetchPlan().addFetchGroup("contactDetails");

      It seems the code causes a huge memory leak with JDBCBrokerFactory growing its MapBackedSet, ConcurrentHashMap.

      Any ideas why this would be? I am calling the above code over-and-over again for each EJB method invocation, which it was my understanding it is only good for the current EM transaction. Perhaps I have misunderstood.

      My Requirement is to set the fetch group only for the current transaction, such that lazy fields for a particular entity get loaded up front, but only within this call from the EJB.

      Attachments

        1. screen shot OOM.jpg
          286 kB
          brian yoder

        Activity

          People

            Unassigned Unassigned
            byoder brian yoder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: