HibernateCacheStore in Coherence, Issues With StoreAll()
(Doc ID 825336.1)
Last updated on OCTOBER 12, 2022
Oracle Coherence - Version 3.3.0 to 3.4.2 Information in this document applies to any platform.
Having some issues with the storeAll() method in the provided HibernateCacheStore. When an object included in the Map of entries has an exception on save, the entire batch is not persisted, and the processing never gets to a point where any of those objects are saved. Attempting to throw an UnsupportedOperationException from the storeAll() method of the HibernateCacheStore, it seems to mean that throwing this exception essentially forces the store() method to be used exclusively from that point forward, saving 1 object at a time.
Is there any way to trigger Coherence to start using the storeAll() method again at runtime? Is one forced to restart the cluster if it gets to this point?
It doesn’t look like the storeAll() method in the HibernateCacheStore is doing any sort of batching – everything executes in one transaction, but there does not seem to be any flush logic or anything that would indicate that the actual trips to the database are being batched. So, is one losing anything by using store() rather than storeAll() (outside of the expense of creating a transaction for each object)?
How come there is no better exception handling in this regard in Coherence? Couldn’t Coherence try to batch writes and flip over to using store() in the case where an exception is encountered? Then it could automatically flip back to using storeAll(), excluding any of the objects that it couldn’t save independently. Seems like this wouldn’t be too terribly difficult to write and would save clients a lot of time and pain.
Is there an operation that is exposed via JMX that we could invoke to force the backing map to switch back to using storeAll()? Or does it take a custom implementation there as well?
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!