openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Help requested around rollback semantics
Date Fri, 20 Apr 2007 02:04:26 GMT
Yeah, it's not ideal, and is something we're hoping to resolve in the
next version of the spec. The good news is that OpenJPA provides a bunch
more flexibility.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: David.Vancouvering@Sun.COM 
> [mailto:David.Vancouvering@Sun.COM] On Behalf Of David Van Couvering
> Sent: Thursday, April 19, 2007 6:18 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Help requested around rollback semantics
> 
> 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
> > 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

Mime
View raw message