Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4679

HHH-5394 Lock is not released after updating Entity, "Cached item was locked" is seen in the logs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • TBD
    • 4.3.0.GA_CP08
    • Hibernate
    • None
    • Not Required

    Description

      See http://opensource.atlassian.com/projects/hibernate/browse/HHH-5394 for a reproducible example. In short, create an object, update it, and perform a second get on that object (caching is on yes), in that second get in the hibernate trace logging "cached item was locked" is seen. The operations are done serially and not in parallel, so the cache item should not still be locked as in http://fisheye.jboss.org/browse/Hibernate/core/trunk/core/src/main/java/org/hibernate/cache/ReadWriteCache.java?r=HEAD there is a
      finally

      { cache.unlock(key); }

      Example of the logs:
      06-22 13:36:17,416 TRACE [org.hibernate.event.def.DefaultLoadEventListener] loading entity: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 TRACE [org.hibernate.event.def.DefaultLoadEventListener] attempting to resolve: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 TRACE [org.hibernate.cache.ReadWriteCache] Cache lookup: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 TRACE [org.hibernate.cache.ReadWriteCache] Cached item was locked: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 TRACE [org.hibernate.event.def.DefaultLoadEventListener] object not resolved in any cache: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 TRACE [org.hibernate.persister.entity.AbstractEntityPersister] Fetching entity: org.domain.seam202fp.entity.Parent#1
      2010-06-22 13:36:17,416 DEBUG [org.hibernate.loader.Loader] loading entity: org.domain.seam202fp.entity.Parent#1

      Attachments

        Activity

          People

            shaozliu Strong Liu(刘少壮) (Inactive)
            sjmenden_jira Samuel Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: