-
1. Re: PassivationInterceptor synchronization and behavior?
jerrygauth Apr 4, 2006 10:41 AM (in response to genman)I don't have an answer to your question but I can offer that the passivations counter code can be moved out of the synchronized block.
if (cache.getUseInterceptorMbeans()&& statsEnabled)
m_passivations++;
Of course, this code must still be located within the conditional expression
if(meth.equals(TreeCache.evictNodeMethodLocal))
so moving it is probably only useful if you restructure the synchronization block. -
2. Re: PassivationInterceptor synchronization and behavior?
hmesha Apr 4, 2006 11:32 AM (in response to genman)The synchronization statement is needed to prevent multiple threads from trying to passivate or activate the node at the same time. However, we can switch to use BaseCacheLoaderInterceptor.obtainLoaderLock() to obtain locks. The same strategy used in CacheStoreInterceptor and CacheLoaderInterceptor. Please open a JIRA Issue for it and it'll be done.
Cheers,
Hany -
3. Re: PassivationInterceptor synchronization and behavior?
genman Apr 4, 2006 2:58 PM (in response to genman)
I don't get how it was supposed to work, since if there were two evict calls, the two CacheLoader.put(Fqn, Map) calls would still happen, though serialized in some order. Is CacheLoader.put() externally synchronized? Maybe I misunderstood the code.
http://jira.jboss.com/jira/browse/JBCACHE-533