glassfish
  1. glassfish
  2. GLASSFISH-2642

Performance problem when initialising the EntityManagerFactory

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 9.0pe
    • Fix Version/s: not determined
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2,642
    • Status Whiteboard:
      Hide

      HIGH

      Show
      HIGH

      Description

      This is the jar I downloaded: glassfish-installer-v2-b33d.jar

      The issue is discussed here: http://forums.java.net/jive/thread.jspa?
      messageID=206726&#206726

      This was the folder structure in my project:
      [Folder in classpath]

      • [com]
      • [org]
      • [META-INF]
      • - Persistence.xml
      • [is]

      It took 18 seconds to start the EntityManagerFactory.

      When I moved [META-INF] into a separate directory in the classpath, it took 6
      seconds:
      [Folder 1 in classpath]

      • [com]
      • [org]
      • [is]
        [Folder 2 in classpath]
      • [META-INF]
      • - Persistence.xml

      The reason was that in the first structure, the system was searching for
      persistence units in [com], [org] and [is] too. I would have thought it should
      only search in [META-INF]. The debugger showed a lot of time spent on
      repeatedly constructing DirectoryArchive(File, Logger) invoked by
      PersistenceUnitProcessor.

      Regards,
      Thorvaldur

        Activity

        Hide
        gyorke added a comment -

        This issue is made bigger when the the jars are on remote systems as is the case
        with Webstart.

        Show
        gyorke added a comment - This issue is made bigger when the the jars are on remote systems as is the case with Webstart.
        Hide
        gfbugbridge added a comment -

        <BT6543389>

        Show
        gfbugbridge added a comment - <BT6543389>
        Hide
        pkrogh added a comment -

        There is a work around listed in the forum post.

        "...the work-around is to package the META-INF/persistence.xml file in it's own
        jar, thereby making the extra download trivial in time."

        Not clear where the issue is, but it should be investigated. Made it a P4 HIGH
        as it doesn't have gating implications on this release.

        Show
        pkrogh added a comment - There is a work around listed in the forum post. "...the work-around is to package the META-INF/persistence.xml file in it's own jar, thereby making the extra download trivial in time." Not clear where the issue is, but it should be investigated. Made it a P4 HIGH as it doesn't have gating implications on this release.
        Hide
        tware added a comment -

        set to new

        Show
        tware added a comment - set to new
        Hide
        Tom Mueller added a comment -

        Bulk change to set fix version to "not determined" where the issue is open but the value is for a released version.

        Show
        Tom Mueller added a comment - Bulk change to set fix version to "not determined" where the issue is open but the value is for a released version.

          People

          • Assignee:
            tware
            Reporter:
            thorvaldur
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: