Issue Type: Bug Bug
Affects Versions: 4.1.8
Assignee: Unassigned
Attachments: StandardQueryCache.patch
Components: core
Created: 29/Nov/12 1:23 PM
Description:

in rare circumstances StandardQueryCache throws ObjectNotFoundException in multi threaded environment.

This happens if an Entity is deleted from the 2nd level cache (by a second thread) just between the following two events:
1. The QueryCache returning the CacheKey for the Entity
2. The Entity actually being assembled from the EntityCache by the TypeHelper

It is easy to simulate this be adding a breakpoint at line 158, deleting the Entity from within a second thread and then resume StandardQueryCache thread.

My solution to fix this is to catch the ObjectNotFoundException in addition to the UnresolvableObjectException and EntityNotFoundException. See attached path

Andy

Environment: JDK 1.7 MySql 5.5
Project: Hibernate ORM
Priority: Minor Minor
Reporter: Andy flury
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira