[Design of JBossCache] - Re: Service threads
by bstansberry@jboss.com
The issue is I don't provide the thread. JBossWeb or the EJB3 runtime provide the thread, and it periodically invokes my integration code telling it to "backgroundProcess". JBC eviction is then part of that background process work.
Perhaps a clearer way to conceptualize the problem is to think of cache eviction as one step in an overall larger task. Say, for example, step 2 of 3. I want to control the order of execution of the whole task. JBC passing one step to an executor on its own schedule doesn't let me do that.
If allowing configuration for this is too ugly, I could just drop in a custom executor that just drops tasks on the floor. The main thing for me is to make sure the API still exists for an external thread to run eviction (get region, get the eviction policy, trigger the policy to run.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164585#4164585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164585
17 years, 8 months
[Design of JBossCache] - Re: Custom data versions
by bstansberry@jboss.com
Not from me, other than a vague thought that it would be good to use the testsuite of the Hibernate/JBC2 integration to test this as it develops. I'm not sure how much of a revamp of the integration that would take though; e.g. am I making any assertions about DataVersion values in the testsuite (hope not; seems unnecessary since I can store a "version" value inside the node's data itself.) For sure:
1) the OPTIMISTIC configs would have to be changed to MVCC (better yet add new MVCC configs and tests that use them.)
2) the calls that pass a DataVersion would have to be changed to not do that (or better yet the integration detects MVCC and uses the existing adaptors designed for PESSIMISTIC.)
I suppose a cache-jbosscache3 module could be added to Hibernate core at some point. We'd just have to be sure it doesn't get included in the main build of Hibernate core until it's ready and the main build is ready for it (i.e. don't add a "module" element for it to the top-level Hibernate core pom.)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164581#4164581
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164581
17 years, 8 months