Apache JDO Project - Re: refresh()

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > May 2007 > Re: refresh()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: refresh()
Craig Russell

2007-05-01, 1:11 pm

Hi Christiaan,

The behavior you describe is consistent with the specification. The
second level cache is intended to be transparent to the application in
most cases.

If you are getting optimistic failures, it might be good to try
flush() within your application, and then refresh with the optimistic
exception parameter, which will refresh all of the failed objects. If
flush followed by refresh doesn't invalidate the second level cache
for the failed objects and go to the datastore, then there is an
issue.

Perhaps if you can explain why this behavior doesn't work for your
application we can take a closer look at the issue.

Best regards,

Craig

Hi,

I frequently encounter the situation in which I need the latest data
from the datastore, for instance to avoid optimistic verification
exceptions. According to the spec I would say that
PersistenceManager.refresh() is the right job for this "Refresh the
state of the instance from the data store." However, the JDO
implementation I use has a Level 2 datastore cache and I noticed that
the refresh() not refreshes() the data from the datastore but from the
datastore cache. I've discussed this with them and their argument is
that the datacache is being treated as the datastore. Is this according
to the spec?



Kind regards,

Christiaan

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com