Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-9384

Analyze usage of SequenceAccessorService and determine if we can refactor away the need to "prefetch" sequence identifier values

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: Analysis, JPA, Roadmap
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-1151Determine what RI would be needed in KEW
      KULRICE-9865SequenceAccessorService trying to grab sequence values from incorrect database in GenericPermissionMaintainable
      KULRICE-9340Refactor inappropriate usages of BusinessObjectService.findMatching where exact matches are expected
      KULRICE-13067MaxValueIncrementerFactory needs to be used instead of SequenceAccessorService in KualiMultivalueLookups and possibly in other places
      KULRICE-935Implement usage of app specific message values in workflow
      KULRICE-11616Replace usage of SequenceAccessorService with MaxValueIncrementerFactory in KRMS
      KULRICE-11617Replace usage of SequenceAccessorService with MaxValueIncrementerFactory in KIM
      KULRICE-1818Determine why we need to duplicate defaults in org.kuali.rice.TestBase in the KNS module
      KULRICE-9417Determine if we really need org.kuali.rice.krad.data.provider.util.PersistenceUtils
      KULRICE-3319Determine if we need to do some work on the KimTypeService interface to make return types more consistent
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Persistence Framework
    • Sprint:
      JPA Sprint 4
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      It looks like this is mostly being done in KIM and KRMS at the moment. Can we refactor this code so that it doesn't prefetch this value but rather just allows the identifier to be assigned when the object is persisted/saved.

      If so, that would allow us to eliminate the dependency on the sequence accessor service for apps using the new data layer and we could deprecate SequenceAccessorService.

      If we were ultimately able to do this, that would also open the door in the future to taking advantage of things like auto incrementing identify columns instead of having to "fake" sequences in MySQL like we do now. I would really like to avoid adding a "getNextId" onto the PersistenceProviderInterface because that is something that a majority of implementers will not be able to implement easily or cleanly. So eliminating this requirement makes our lives a lot easier

        Activity

        Hide
        Eric Westfall added a comment -

        Other projects are doing this as well. Even if we did factor such away, there's still no way in JPA to say "use sequences if the database supports them, use identity columns if not". So instead we implemented the @PortableSequenceGenerator which appears to be a cleaner solution here and allows us to continue with our sequence emulation layer on databases like MySQL.

        Show
        Eric Westfall added a comment - Other projects are doing this as well. Even if we did factor such away, there's still no way in JPA to say "use sequences if the database supports them, use identity columns if not". So instead we implemented the @PortableSequenceGenerator which appears to be a cleaner solution here and allows us to continue with our sequence emulation layer on databases like MySQL.

          People

          • Assignee:
            Eric Westfall
            Reporter:
            Eric Westfall
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 days
              2d
              Remaining:
              Remaining Estimate - 1 day
              1d
              Logged:
              Time Spent - Not Specified Time Not Required
              Not Specified

                Agile

                  Structure Helper Panel