Caching and multiple threads?

  • Bryan Thompson
    Bryan Thompson


    I am trying to get a grip on how to deal with persistent objects, caching and transactions in JDBM.  For example, how should I approach caching persistent objects when they are accessed by multiple threads, some of which are performing updates?  The FamousPeople example suggests that the cache is applied internally by the BTree class.  Does the application need to interact directly with the cache for its persistent objects or can the cache be transparently applied, e.g., by the record manager?  How are distinct states of the same object handled, e.g., when it is being modified in one transaction while it is being read in another?  (I assume that this is Ok and that the modified data shadows the last consistent persistent state until the commit).