OpenJPA
  1. OpenJPA
  2. OPENJPA-1372

Generating identifiers by using sequence table may fail during sequence table initialization

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.0.0-M3
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: jdbc, kernel
    • Labels:
      None

      Description

      When sequence table does not exist and mutliple threads get EntityManagers from EntityManageFactory, an insert into sequence table may fail because of duplicate primary key value.

      EMF is created lazily by default and users reported various problems with concurrent initialization (e.g. failures in resolving aliases in JPQL queries, IIRC) of EMF. This issue might have the same roots.

      Issue and test case originally reported by Pinaki in OPENJPA-466.

      1. TestSequenceGenerationOnMT.java
        2 kB
        Milosz Tylenda
      2. GeneratedIdObject.java
        0.5 kB
        Milosz Tylenda

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Michael Dick
              Reporter:
              Milosz Tylenda
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development