OpenJPA
  1. OpenJPA
  2. OPENJPA-1532

Should the <shared-cache-mode> element in a persistence unit definition automatically turn on the data cache?

    Details

    • Type: Question Question
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.1.0, 2.2.0
    • Fix Version/s: 2.2.2, 2.3.0
    • Component/s: datacache
    • Labels:
      None

      Description

      The JPA 2.0 spec introduces a new persistence unit definition element, <shared-cache-mode>, which accepts NONE, ALL, ENABLE_SELECTIVE, and DISABLE_SELECTIVE. The JPA 2.0 spec section 3.7.1 documents the behavior of each of those modes.

      What I am curious about is if the use of <shared-cache-mode> should implicitly enable OpenJPA's data cache plugin. Currently, the above element is completely ignored if the persistence unit is missing the properties: openjpa.DataCache=true and openjpa.RemoteCommitProvider=sjvm (because by default, OpenJPA disables data caching). My interpretation of the spec suggests that <shared-cache-mode> is not only a platform-independent method of instructing the data cache which entities are eligible for admittance to the data cache, but it is also a switch providing a platform-independent method of both turning the data cache on or off (since whether the cache is enabled by default is platform-specific). Otherwise, why have a NONE value, if it was not intended to be a platform independent means of turning the data cache off?

      1. OPENJPA-1532.patch
        56 kB
        Helen Xu
      2. OPENJPA-1532.patch.txt
        19 kB
        Michael Dick
      3. OPENJPA-1532-Doc.patch
        4 kB
        Helen Xu
      4. OPENJPA-1532-MigrationDoc.patch
        1 kB
        Helen Xu

        Activity

        Jody Grassel created issue -
        Michael Dick made changes -
        Field Original Value New Value
        Assignee Michael Dick [ mikedd ]
        Michael Dick made changes -
        Attachment OPENJPA-1532.patch.txt [ 12437002 ]
        Rick Curtis made changes -
        Assignee Michael Dick [ mikedd ] Rick Curtis [ curtisr7 ]
        Helen Xu made changes -
        Assignee Rick Curtis [ curtisr7 ] Helen Xu [ helenxu ]
        Helen Xu made changes -
        Attachment OPENJPA-1532.patch [ 12547768 ]
        Attachment OPENJPA-1532-Doc.patch [ 12547769 ]
        Rick Curtis made changes -
        Assignee Helen Xu [ helenxu ] Rick Curtis [ curtisr7 ]
        Fix Version/s 2.3.0 [ 12319463 ]
        Affects Version/s 2.2.0 [ 12315910 ]
        Affects Version/s 2.0.0-M2 [ 12313483 ]
        Affects Version/s 2.0.0-M1 [ 12313624 ]
        Affects Version/s 2.0.0-M3 [ 12314148 ]
        Affects Version/s 2.0.0-beta [ 12314149 ]
        Affects Version/s 2.0.1 [ 12314532 ]
        Rick Curtis made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Rick Curtis made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Fix Version/s 2.2.2 [ 12323356 ]
        Resolution Fixed [ 1 ]
        Helen Xu made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Helen Xu made changes -
        Attachment OPENJPA-1532-MigrationDoc.patch [ 12552336 ]
        Helen Xu made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Albert Lee made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Jody Grassel
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development