I finished the example yesterday and will soon write an article about configuring this. The carmart-tx-jdbc works in both JBossAS7 and Tomcat 7. You'll need to look at "tomcat" profile in the pom.xml file as it is using JBoss Transaction Manager, and it works ! To find all dependencies, run "mvn dependency:tree -Ptomcat".

I was looking to have feature similar to overflow-to-disk. So, Only on eviction I expect the entries to be on the file. As the entries are NOT required across server startup, I have set the purgeonstartup to true.

<loaders passivation="true" shared="false" preload="false">

<loader class="org.infinispan.loaders.file.FileCacheStore"

fetchPersistentState="false" ignoreModifications="true"

purgeOnStartup="true" purgerThreads="25">

<properties>

<property name="location" value="/home/balaji/" />

</properties>

</loader>

</loaders>

Is it the problem with ignoreModifications flag ?

Also, One more scenario to clarify.

Let's say I have set the eviction policy with maxEntries = 5 & strategy = FIFO, expiration maxIdle time being set to 1000millisecs, llifespan set to 300000(5 minutes) - I am trying to add 6 entries to cache. Before adding 6th entry, 1 entry has to be evicted as the cache maxEntries is reached. As I have configured the filestore, it should have been passivated (per configuration this is enabled) on to the store.

After immediately adding 6th entry, I am trying to retrieve the 1st entry from the cache. This should get the entry by activating the entry from filestore. But this is NOT happening and am getting a null value. Can you please validate my understanding ?

Yes, the problem is ignoreModifications="true" -> you cannot write anything to the cache store so it remains empty. Btw, if you set maxEntries to 5, the actual maxEntries will be 8 -> the nearest higher power of 2 is set to it. And there might be problems with so low numbers on some JVM types. It's simply constructed for higher values.