Why do cache loaders go into an inconsistent state when I use transactions, pessimistic locking, and I attempt to read a node after removing it from within the same transaction scope?
This is a known bug (see JBCACHE-477 and JBCACHE-352 ), which have been fixed in JBoss Cache 1.4.0. A very simple workaround if you’re using JBoss Cache 1.3.x is to use optimistic locking. One of the consequences of this bug is that, for example, if you use PojoCache with pojos that have private references to a List and you update and remove someelements of that List within a transaction (when using pessimistic locking and a cache loader), you may see IllegalStateExceptions thrown.
Related Questions
- I read on one web site for a school that they have over 20 years of experience preparing students for exams, yet they don state how long their school has actually been in business. Why?
- Why do cache loaders go into an inconsistent state when I use transactions, pessimistic locking, and I attempt to read a node after removing it from within the same transaction scope?
- Do all land transactions have to go through the Secretary of States Office?