OpenJPA
  1. OpenJPA
  2. OPENJPA-1328

Move cacheable class configuration to ClassMetaData

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1
    • Fix Version/s: 1.0.4, 1.2.2, 1.3.0, 2.0.0-beta
    • Component/s: datacache
    • Labels:
      None

      Description

      I'm proposing to move the cacheable class configuration processing from the datacache classes to ClassMetaData. The feature, introduced in OPENJPA-1045, effectively works by returning null for ClassMetaData.getDataCacheName(), where classes which should not be cached return null, otherwise the name of the datacache they may be cached by is returned.

      THe problem is that some third party datacache plugins are not reentrant, and the existing ClassMetaData.isCacheable() makes use of the method call getRepository().getConfiguration().getDataCacheManagerInstance(). This invokes the initialization of the datacache, which may result in further initialization/copying of CMD objects, which reenter the isCacheable() method. If a third party datacache plugin is not reentrant safe, this can cause a failure in the form of Exceptions or hung threads.

        Activity

        Jody Grassel created issue -
        Jody Grassel made changes -
        Field Original Value New Value
        Attachment OpenJPA_1.2.x_OJ1328.patch [ 12421021 ]
        Michael Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Michael Dick made changes -
        Fix Version/s 1.2.2 [ 12313681 ]
        Fix Version/s 1.3.0 [ 12313326 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Michael Dick made changes -
        Fix Version/s 1.0.4 [ 12313301 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta [ 12314149 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Michael Dick
            Reporter:
            Jody Grassel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development