When the "passivation" attribute is set to false, entries are written to a cache store (no matter it is file cache store or jdbc cache store) right after they are stored in the cache and thus a file is created in the filesystem.
Why would you create a file when a cache entry is modified? Not sure what you wanna achieve here.
Passivation default value is false (I added it anyway) still did not work meaning the file did no saved the changes
I my system I have a cached object that are not changing much.
I want to use a file store as a simple persistent solution
If the machine lost power and restarting I need bring the server to the state that it had
That is why I need the file store to save changes of the cache objects continuslly
Any ideas ?
Ok, I understand what you would like to achieve and I'm pretty sure this works in Infinispan.
How do you store the changes to those objects? Are you using .replace() method or simply suppose that any change to that object (like changing its field) will be automatically persisted? ...cos the latter is not supported by ISPN.
What is not supported the update of the store on change to a field object
Or generally any change to a field object?
Let’s say in cluster mode one make a change the other will not see it?
If you make any changes to an object, you need to then call cache.put() or equivalent call to make sure the changes are reflected in the cache.
I remeber working with Jboss Cache that I did not need to do it :-(
Is there a cache annotation I can add ?
There's no annotation that can help you with this.
In JBossCache you pretty much needed to do the same thing actually. PojoCache indeed offered this funcionality.
If you need a similar approach to PojoCache - but much nicer - take a look at Hibernate OGM(http://www.hibernate.org/subprojects/ogm.html) as it can be configured to store data in the infinispan grid.