[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1100?page=c...
]
Nico De Groote commented on HHH-1100:
-------------------------------------
I did fix the problem mentioned above.
I performed the following change in the execute method of the EntityUpdateAction class.
...
if ( !veto ) {
try{
persister.update( id, fields, dirtyFields, hasDirtyCollection, oldFields,
lastVersion, instance, rowId, session );
} catch (StaleObjectStateException ex){
if (persister.hasCache()){
EvictEvent evictEvent = new EvictEvent(instance, session);
session.getListeners().getEvictEventListener().onEvict(evictEvent);
}
throw ex;
}
}
...
It does the trick for me, however this might not be completely correct for you.
Invalidate cache on StaleObjectStateException
----------------------------------------------
Key: HHH-1100
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1100
Project: Hibernate3
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira