[jboss-user] [JBoss Cache: Core Edition] - Re: Custom Eviction Policy and JDBC Cache loader

mircea.markus do-not-reply at jboss.com
Thu Sep 4 11:05:15 EDT 2008


anonymous wrote : For this, I have done a custom eviction Policy to remove data from cache, as related in here. 
JBC3.0 solves this problem much nicely: you are allowd to specify an EvictionActionPolicy for each evcition algorithm. EvictionActionPolicy refers to allowing one to do to-disk eviction, remove from memory or whatever strategy is chosen. 
anonymous wrote : What I experience is that my data is being written to secondary storage as soon as I write into cache
I guess what you need here is passivation:
<passivation>false</passivation>
Take a look at what passivation can do for you in the user guide.
anonymous wrote : and once the eviction work runs, it removes data from database that has the custom remove policy.
  | 
That is because when you do cache.remove within your custom eviction, this will go through the interceptor chain and remove data from DB, as per a normal cache.remove. Again, passivation should solve this issue for you.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174336#4174336

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174336



More information about the jboss-user mailing list