Uploaded image for project: 'JBoss POJO Cache'
  1. JBoss POJO Cache
  2. PCACHE-58

Removal of Pojo in Collection loaded from CacheLoader returns a cleared Pojo

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.4.1.SP5
    • Fix Version/s: 1.4.1.SP9
    • Component/s: Collections
    • Labels:
      None
    • Estimated Difficulty:
      Medium

      Description

      Removal of a Pojo stored in an attached List when the List is created in memory works
      fine. However, when this Collection is stored in a CacheLoader and later, after a Cache
      restart, the List is retrieved via getObject() and an attempt is made to remove a Pojo from
      the List, any Collection Pojo's located after this member are cleared, i.e. their instances
      attributes are zeroed or nulled.

      The problem also occurs with a Map. After loading the Map from the CacheLoader, if we
      remove one of its elements and check the value returned by the remove call, which
      should return the previously stored element in there, the Pojo's values have been cleared.

      TreeCacheAopDelegate._regularRemoveObject receives Object result which is the
      Object that should be returned by the remove call. When cache_.removeData(fqn); is
      called inside regularRemoveObject and the node is cleared, result parameter is cleared as
      well.

      I have added a few test methods to FileCacheLoaderAopCollectionsTest replicating this issue.

      I was talking to Jason yesterday. He's gonna look into it.

      This affects the 1.4.x series.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jason.greene Jason Greene
                  Reporter:
                  galder.zamarreno Galder ZamarreƱo
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: