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

Improved lifecycle tracing of EntityManager and EntityManagerFactory

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • logging
    • None

    Description

      I had to debug a problem today that would have been very simple to solve with the proper OpenJPA tracing. With this JIRA I am going to add trace to EM/EMF creation/close. I'm adding trace (not info/warn messages) so these messages will not be localized.

      Attachments

        Activity

          The trace I'm going to commit shortly adds the following :

          172 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.PersistenceProviderImpl@3a523a52 creating org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 for PU test
          ...
          2312 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@4e164e16
          ...
          2562 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerImpl@4e164e16.close() invoked.
          ....
          2578 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@2f2c2f2c
          ...
          2922 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerImpl@2f2c2f2c.close() invoked.
          ....
          2922 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1.close() invoked.

          curtisr7 Richard G. Curtis added a comment - The trace I'm going to commit shortly adds the following : 172 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.PersistenceProviderImpl@3a523a52 creating org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 for PU test ... 2312 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@4e164e16 ... 2562 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerImpl@4e164e16.close() invoked. .... 2578 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1 created EntityManager org.apache.openjpa.persistence.EntityManagerImpl@2f2c2f2c ... 2922 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerImpl@2f2c2f2c.close() invoked. .... 2922 test TRACE [main] openjpa.Runtime - org.apache.openjpa.persistence.EntityManagerFactoryImpl@1bd11bd1.close() invoked.

          We could do some more work this area... but this is a start.

          Committed 999077 to trunk.

          curtisr7 Richard G. Curtis added a comment - We could do some more work this area... but this is a start. Committed 999077 to trunk.

          People

            curtisr7 Richard G. Curtis
            curtisr7 Richard G. Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: