jpa-spec
  1. jpa-spec
  2. JPA_SPEC-32

Add a property to define cache implementation in persistence.xml

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Labels:
      None

      Description

      The cache implementation for the second level cache currently has to be configured via vendor specific properties but the semantics of the Cache are already reflected in the interface javax.persistence.Cache. The cache implementation should be configurable via persistence.xml.

      I propose the property javax.persistence.cache.provider and the value of it should be the class name of the cache provider that actually implements javax.persistence.CacheProvider.

      The CacheProvider interface could look similar to the RegionFactory interface hibernate actually uses.
      Including the option to specify cache implementations in a stadardized way will improve the portability of applications and also make people to use the standard JPA provider of a container instead of packaging their own one in their applications.

        Activity

        Hide
        arjan tijms added a comment -

        Maybe it's also convenient to take JCache into account, instead of or perhaps next to a new javax.persistence.CacheProvider? Just like JPA 2.1, JCache is slated for inclusion into Java EE 7.

        Show
        arjan tijms added a comment - Maybe it's also convenient to take JCache into account, instead of or perhaps next to a new javax.persistence.CacheProvider ? Just like JPA 2.1, JCache is slated for inclusion into Java EE 7.
        Hide
        c.beikov added a comment -

        I wasn't aware of the status of JCache back when I made this issue. Integrating JCache is IMHO the right way!

        Show
        c.beikov added a comment - I wasn't aware of the status of JCache back when I made this issue. Integrating JCache is IMHO the right way!

          People

          • Assignee:
            ldemichiel
            Reporter:
            c.beikov
          • Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: