I had a few questions regarding the expireCache method on Database?  Please forgive me 
if some of them seem elementary.


If you call expireCache on an object that's already loaded, exactly what happens.  
Does Castor invalidate the object reference or does it invalidate the cache entry?  

Is this affected by access mechanism ("read-only", "shared", etc) that the object was 
loaded under?

Consider the case where an object is loaded is shared access mode, if the cache is 
expired and then an update is called on the expired object what happens?  Is an 
ObjectModifiedException thrown, or is the cached version overwritten?

Can you expire the cache entry for an object that is loaded for exclusive access (e.g. 
an object that's about to be persisted)?

Can you expire the cache of an object that's involved in a transaction?  If so how is 
this handled?

The javadocs of expireCache suggest that the cache of dependent objects are 
automatically expired if their parent object is expired; but only if the parent object 
was expired explicitly (i.e. class type and object id specified).  If the parent 
object was expired implicitly, (i.e. the parent object is of type A, and the cache of 
all type A objects was expired), the dependent objects will need to have their caches 
expired separately.  Is this understanding correct?




I expect to be able to answer some of these questions myself by review the code 
implementation and through experimentation; however this can costly timewise.  If 
anyone has this knowledge readily available (Vincent, Bruce, et al) it would be 
greatly  appreciated.  Rest assured, that all I learn will be shared as well.

Vincent Techeira

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to