openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <da...@vancouvering.com>
Subject Re: Help requested around rollback semantics
Date Fri, 20 Apr 2007 01:18:10 GMT
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
> 

Mime
View raw message