The cache implementation is configurable. OJB can be configured to have a static cache that holds the objects loaded from the db for all time ObjectCacheDefaultImpl, a cache that is limited in scope to a single transaction (actually from the time you get a broker from the pool to the time you return it) ObjectCachePerBrokerImpl, or no caching via ObjectCacheEmptyImpl. There's even some more implementations I'm not sure what do.
If you were seeing changes made through SQL not reflected in queries your OJB.properties is probably configured with ObjectCacheDefaultImpl.
That explains it. And from looking at the code for class, I can see that clearing the cache returned by a broker when it's an instance of ObjectCacheDefaultImpl will result in clearing the only cache there is, even though access to it is mediated by a broker instance.
So I can run a batch database process outside of OJB and call one cache clear method and have my application respect the data loaded externally. This is what I needed to figure out, so thanks everyone!
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
