I'm experimenting with infinispan in jboss 7.1 and 7.2 and I am noticing strange behaviours when logging my beans @PrePassivate and @PostActivate mehtod calls. One thing is that the file passivation store does not behave as expected: If I remotely create 4 stateful ejbs into an cache with max-entries="3", the first three are put into the cache correctly. The fourth bean is stored too, forcing bean 01 to passivate - good. But reactivating bean 04 after a short pause does NOT force bean 02 to passivate - there are four beans now in my 3-element cache! Yes, bean 04 seems to be passivated again after its max-idle timeout. The other - untouched beans 02 and 03 interestingly are NOT passivated and kept in memory. Is that cache behaviour intended? Do I miss something?
My cache configuration is pretty straightforward, nothing special:
<stateful default-access-timeout="5000" cache-ref="passivating" clustered-cache-ref="clustered"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
<file-passivation-store name="file" idle-timeout="3" max-size="3"/>
Thanks in advance!