[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1100) Invalidate cache on StaleObjectStateException

Nico De Groote (JIRA) noreply at atlassian.com
Mon Oct 27 08:51:05 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31540#action_31540 ] 

Nico De Groote commented on HHH-1100:
-------------------------------------

Been upgrading to Hibernate 3.3.1.GA and had to fix this one again......

Now I did the following update in the execute method of my EntityUpdateAction class.

try{
  persister.update(id, state, dirtyFields, hasDirtyCollection, previousState, previousVersion, instance, rowId, session);
} catch (StaleObjectStateException ex){
    if (hasCache){					
         ((Session)session).evict(instance);
    }
   throw ex;
}

> Invalidate cache on StaleObjectStateException 
> ----------------------------------------------
>
>                 Key: HHH-1100
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1100
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Gavin King
>            Assignee: Gavin King
>            Priority: Critical
>
> We should probably invalidate the second-level cache when a StaleObjectStateException occurs. Need to think this through.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list