1. OpenJPA
  2. OPENJPA-669

NativeSequences can be incremented within the business transaction


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.6, 0.9.7, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:


      SQL Sequences are independent of the transaction. Therefore the same connection which is used to insert a row can be used to increment the sequence value.

      Currently we treat these native sequences in the same manner as updating a sequence table - ie the work will be done on connection2 (aka the non-jta-data-source). This appears to be unnecessary and requires an additional datasource when running in a managed environment which can't suspend the current transaction

      To resolve the problem I added a nativeSequenceType attribute to the DBDictionary class. This setting will be used to determine the whether the databases sequences are transactional, contiguous or non transactional (Default is contiguous). If the native sequences are transactional or contiguous they will be executed within the current transaction and will not require a second connection factory.


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        13m 47s 1 Michael Dick 28/Jul/08 21:24
        Michael Dick made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Michael Dick made changes -
        Field Original Value New Value
        Assignee Michael Dick [ mikedd ]
        Michael Dick created issue -


          • Assignee:
            Michael Dick
            Michael Dick
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: