> 
> Hi Nicolai,
> 
> Nicolai Krog wrote:
> 
> > Hi all,
> > 
> > I am new here (this is my first post), so please bare with me 
> > 
> > I am using OJB in a rather large web-application.
> > 
> > I am experiencing the problem that I sometimes get "old" values returned.
> > Fx. if I have a certain field value "false", set it to "true" and write it 
in 
> > db, I can later experience that a method returns the old "false" value. 
Even 
> > though that I can see that the value IS set to "true" in my DB.
> > 
> > So somehow there is a divergence between my object in RAM and the data 
stored 
> > in DB. 
> > 
> > I am sure, that I am missing something important about how to use OJB, 
what 
> > could it be?
> > 
> 
> This sounds like a cache problem. Have a look at
> http://db.apache.org/ojb/objectcache.html#Shipped%20cache%20implementations
> 
> further if your referenced objects be outdated you can enable the 
> 'refresh' attribute on reference- and collection-descriptor
> http://db.apache.org/ojb/repository.html#reference-descriptor
> http://db.apache.org/ojb/repository.html#collection-descriptor
> 
> regards,
> Armin
> 
> > Kindest regards,
> > 
> > Nicolai Krog
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe <at> db.apache.org
> > For additional commands, e-mail: ojb-user-help <at> db.apache.org
> > 
> > 
> > 
> 
Hi Armin,

WOW, thanks! You were right; I changed the object-cache implementation to 
ObjectCachePerBrokerImpl (it was the ObjectCacheDefaultImpl before), and the 
problem vanished! :-D

This was REALLY nice of course, but the whole thing has made me sweat a bit; 
my application is quite sensible, - I simply cannot allow these dirty reads to 
happen! A 99% trust in ObjectCachePerBrokerImpl is not enough - I have to be 
sure!

For me the important question is now: "Can I now sleep calmly knowing that 
things like this will NEVER happen again?" 

An other thing: I have performed a lot of JUnit testing on my app, and in 
these tests, this error is not present. Do you have any thoughts upon why it 
is, that the error only happened when I tested through the web?

Also, I would like to know, if the ObjectCachePerBrokerImpl is very expensive 
in performance?

Thank you so much for your repsonse, - you made my day!

Kindest regards,

Nicolai


Armin Waibel <arminw <at> apache.org> writes:





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to