db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave.De...@Equifax.com
Subject Re: Question about transaction rollback
Date Thu, 16 Oct 2003 17:59:51 GMT
Armin,

I know that you've been working on a 2-tier cache (which I'm really interested in
seeing BTW), and I was wondering how that would affect this situation. Am I
correct in thinking that on a rollback, rather than flushing the objects from the
cache (or attempting to partially restore them), we would be able to restore from
the global cache?

Dave Derry



                                                                                         
                                       
                      Armin Waibel                                                       
                                       
                      <armin@code-au-l         To:      OJB Developers List <ojb-dev@db.apache.org>
                             
                      ait.de>                  cc:                                    
                                          
                                               Subject: Re: Question about transaction rollback
                                 
                      10/16/2003 08:47                                                   
                                       
                      AM                                                                 
                                       
                      Please respond                                                     
                                       
                      to "OJB                                                            
                                       
                      Developers List"                                                   
                                       
                                                                                         
                                       
                                                                                         
                                       



Hi Dave,

...
> ObjectEnvelope #rollback() is only able to restore fields that are
> included in
> the class descriptor;
I agree


...
> restored. Looking at the ObjectEnvelope#rollback() code shows that you
> don't have
> an answer for my second concern, which is, how do you rollback a
> collection?
agree again


...
> But to address my first concern. I have reviewed Klaasjan Brand's message
> regarding inconsistency of cached objects after a rollback, and certainly
> understand his concern.
Yes, the ObjectEnvelope#rollback() was motivated/added by Klaasjan Brand
to make the cache consistent after a tx rollback (read his post
"RFI / PATCH: inconsistent cached objects after transactionrollback?"
in dev-list too).

But the problem depends on the used ObjectCache implementation. E.g. using
ObjectCachePerBrokerImpl is safe without using ObjectEnvelope#rollback().
So I agree till we implement a smarter object cache handling it
is safer to remove the whole object from the cache, then to uncompleted
restore the object.

> state, it is
> safer to flush the object from the cache (as we have done on my current
> project).
+1

regards,
Armin






---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message