Jay, Lemme get this straight first. Both the web and the desktop would have their own instances of OJB?
The caching issue somewhat depends on your requirements. If you're in a highly "pessimistic" transactional environment, then there are a couple of options. You can, as you said, disable caching, or you can set the systems up to clear the caches regularly. At NACSE, we run OJB in a heavily clustered/failover/load-balanced environment. To get around the problem that you are encountering (Caches being out of Synch) we decided to use a clustered/distributed cache. This ensures that the cache structures on different nodes are notified of changes in the cache structure. However, we are in a carefully controlled server only environment. I'm not sure if this would work for you, since the desktops would have to initialize, and synchronize the caches (through multicast) every time someone started their desktop app. Another question: What are the different apps for? For example: if the desktop apps are for entering/updating data for the web system, then why not disable caching on the desktop? If the web-system is more to display (more reads than writes) that input data, then it would be a more logical place for the cache. You can then flush the web cache, and update for input changes at the database. So again, it is likely possible to do what you want. But it depends on your requirements. ps. If you're interested in the distributed cache, I think there is a contrib file somewhere for adding Tangosol Coherence support that I wrote. With the release this week of OSCache 2.0, I am also planning on writing a plug for using OSCache's distributed cache with OJB (Tangosol is expensive, OSCache is free). OJB also supports JCS, but I had real problems with it. Jason On Tue, 2003-07-22 at 10:20, Glanville, Jay wrote: > Hello All. > > I'm currently investigating how OJB can help us. I'm very interested in the > caching abilities of OJB. Especially from a multi-client point of view. > > Here goes the question: how does OJB deal with caching of DB data when a DB > has multiple client applications? For example, I have a database holding > all my data, a web interface and a desktop interface, both connecting > through JDBC. How does OJB caching on one client deal with the other > client's updating of the DB? > > Obviously, the easiest solution to ensure data synchronization would be to > turn off caching. However, caching is currently one of the big selling > points of OJB, so turning it off is not very beneficial to me. Is there a > system whereby a change in the database gets notified to all other clients, > asking them to refresh their cashes? > > Eagerly looking forward to the answer ... > > JDG > > > > -- > Jay Glanville > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
