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

          Milosz Tylenda created issue -
          Milosz Tylenda made changes -
          Field Original Value New Value
          Attachment GeneratedIdObject.java [ 12423767 ]
          Attachment TestSequenceGenerationOnMT.java [ 12423768 ]
          Milosz Tylenda made changes -
          Link This issue relates to OPENJPA-466 [ OPENJPA-466 ]
          Milosz Tylenda made changes -
          Link This issue is related to OPENJPA-1765 [ OPENJPA-1765 ]
          Michael Dick made changes -
          Assignee Michael Dick [ mikedd ]
          Michael Dick made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.2 [ 12315257 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Resolution Fixed [ 1 ]
          Michael Dick made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Milosz Tylenda made changes -
          Link This issue relates to OPENJPA-2269 [ OPENJPA-2269 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development