-
Bug
-
Resolution: Done
-
Major
-
EJB 3.0 RC1
-
None
-
None
-
XP pro
Set transaction isolation to read-committed.
1. read a persistent entity
2. delete the row from the DB from another process
3. refresh the entity
The EntityManager throws:
org.hibernate.UnresolvableObjectException: No row with the given identifier exists: ch.logobject.test.model.TaskAlloc#686796
at org.hibernate.UnresolvableObjectException.throwIfNull(UnresolvableObjectException.java:42)
at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:126)
at org.hibernate.event.def.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:39)
at org.hibernate.impl.SessionImpl.refresh(SessionImpl.java:694)
at org.hibernate.ejb.AbstractEntityManagerImpl.refresh(AbstractEntityManagerImpl.java:160)
at org.jboss.ejb3.entity.InjectedEntityManager.refresh(InjectedEntityManager.java:112)
According to the EJB3 specs the entity manager should throw a EntityNotFoundException. This should be an easy catch/wrap and rethrow fix.