Details

    • Type: Sub-task Sub-task
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.3.3rc1
    • Component/s: JDO
    • Labels:
      None
    • Number of attachments :
      2

      Description

      ObjectLock.invalidate() is called if anything goes wrong during a transaction to indicate that the entity should not be put back into cache as it may have an invalid state (at least as far as I understand this). To do so ObjectLock.invalidate() internally sets _invalidated flag. This flag is checked at ObjectLock.release() to set _object to null. But in contrast to my expectations the flag isn't checked at TypeInfo.release() to determine if the object should be put back into cache or not. Instead a CacheEntry with Object[] being null is put into cache.

      On the other hand we have an mechanism to expire an entity. From my point of view the expiration is called by a user to tell Castor that the entity in cache is invalid which is about similar to the situation where Castor detects an invalid entity state itself.

      1. patch-C3163-20110731.txt
        3 kB
        Wensheng Dou
      2. patch-C3163-20110803.txt
        3 kB
        Wensheng Dou

        Activity

        Hide
        Wensheng Dou added a comment -

        When the ObjectLock.invalidate() is called, the object should be expired. Because the object may not invalidated.
        I think the getObject should return the actual object, not expiredObject.

        Show
        Wensheng Dou added a comment - When the ObjectLock.invalidate() is called, the object should be expired. Because the object may not invalidated. I think the getObject should return the actual object, not expiredObject.
        Hide
        Wensheng Dou added a comment -

        Create a new patch after some other updates.

        Show
        Wensheng Dou added a comment - Create a new patch after some other updates.
        Hide
        Ralf Joachim added a comment -

        We do not get the improvements I expected with the patch attached so I'll close this as won't fix.

        Show
        Ralf Joachim added a comment - We do not get the improvements I expected with the patch attached so I'll close this as won't fix.

          People

          • Assignee:
            Wensheng Dou
            Reporter:
            Ralf Joachim
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: