Uploaded image for project: 'JBoss Cache'
  1. JBoss Cache
  2. JBCACHE-1078

Race condition when adding an object to PojoCache while another thread may read that object

    Details

      Description

      When adding an object to PojoCache, AdvisedPojoHandler attaches a CachedFieldInterceptor to the advised object being added.(line 125) It does this before it adds the object to the actual Cache. If another thread reads this object in between the time the CachedFieldInterceptor is added and the object is inserted into the cache, (line 178) an exception will be thrown in the Reading thread:org.jboss.cache.pojo.PojoCacheAlreadyDetachedException: pojo: class org.jboss.cache.pojo.test.Person has possibly been detached remotely.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jason.greene Jason Greene
                Reporter:
                vincent.marquez Vincent Marquez
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: