[jbosscache-dev] AsyncCacheLoader state transfer problems

Vladimir Blagojevic vladimir.blagojevic at jboss.com
Thu Aug 31 11:36:27 EDT 2006


Hi,

Working closely with cachloaders in the last two weeks I've noticed that
current implementation of AsyncCacheLoader, if I understand things
correctly, might lead to potenntial problems.

If you recall, jbc state transfer (both streaming and byte based)
algorithm is basically:

-acquire lock on root
-transfer state (receive or send)
-release lock on root

Transfer state part of this algorithm is done through cacheloader API
calls (loadState/storeState etc). Besides lock
acquisition/transfer/release there is also a lot of stream creation,
cleanup, etc etc. This algorithm is good as long as we are running on
one thread. 


AsyncCacheLoader does not conform to these assumptions since it runs all
operations on its own thread. It seems like that we have to exempt
load/store state operations from being done on separate, asynch
cacheloader thread.

Any thoughts?





More information about the jbosscache-dev mailing list