jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
castor
  • castor
  • CASTOR-3085 Refactor the ObjectLock class
  • CASTOR-3163

Refactor invalidate and exipre

  • Log In
  • Views
    • XML
    • Word
    • Printable

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    patch-C3163-20110731.txt
    31/Jul/11 9:38 AM
    3 kB
    Wensheng Dou
  2. Text File
    patch-C3163-20110803.txt
    03/Aug/11 3:17 AM
    3 kB
    Wensheng Dou

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wensheng Dou added a comment - 31/Jul/11 9:38 AM

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 - 31/Jul/11 9:38 AM 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
Permalink
Wensheng Dou added a comment - 03/Aug/11 3:17 AM

Create a new patch after some other updates.

Show
Wensheng Dou added a comment - 03/Aug/11 3:17 AM Create a new patch after some other updates.
Hide
Permalink
Ralf Joachim added a comment - 16/Aug/11 4:00 PM

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 - 16/Aug/11 4:00 PM 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
Vote (0)
Watch (0)

Dates

  • Created:
    28/Jul/11 1:11 PM
    Updated:
    16/Aug/11 4:00 PM
    Resolved:
    16/Aug/11 4:00 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.