That's what I thought: broken and detached. Might as well just throw them out. Not to be blunt, but this just sucks. It's as if JPA believes nobody will ever really experience a rollback...

Bleagh!

David

Patrick Linskey wrote:
In generic JPA, the only way to deal with the situation you describe would be to manually call EntityManager.refresh() on each instance that was involved in the transaction so as to ensure that it is up to date.

Actually, I think it's even tougher than this. I think that after
rollback, entities are in an 'error' state, and you really can't do much
of anything with them. I don't think that there's even a guarantee that
you can re-attach such instances.

I believe that in either a transactional or extended PC, instances are
detached into this error state after a rollback. So, I don't think that
you can actually call refresh() on them, per the spec.

-Patrick

Reply via email to