[Opensource] Forcing a DBObject to read from database instead of cache?

Michael Rimov rimovm at centercomp.com
Wed Sep 11 09:18:32 PDT 2002


At 03:04 PM 9/10/2002 -0600, you wrote:
>I'm running my Expresso app in one JVM, and a jobhandler in another 
>JVM.  One of
>my jobs needs to do some things with User() objects.  The behavior that I'm
>seeing is this:
>
>  - User is modified in the app, local references are notified that
>    the object has been updated, and the cached objects behave
>    correctly.
>
>  - The jobhandler (separate JVM) has a cached User object, but doesn't
>    know that it has changed, so uses old/outdated data for this user.
>
>That's not ideal, but I can work with it if there's a method for forcing the
>User object to read from the database.  But I'm not finding one that I can 
>use.
>There are a few in DBObject like removeFromCache() and setStatus("UPDATED")
>which might be a reasonable hack, but they're all protected and my classes 
>can't
>see them.

The Expresso cache does not currently work cross VM.  There is a commercial 
add-on in the process that will work via IP Multicast, but it's still in 
testing/debugging stages.  Until then it would be best if you set up an RMI 
capable Servlet that would do the modification to local objects via RMI. 
(thus the servlet would be running in-VM to the rest of Expresso)

HTH,
                                                 -Mike




More information about the Opensource mailing list