Hi Will,

first, which version of OJB do you use?

I'm not very familiar with the caching stuff,
but try to do my best ;-)

> I find that I'm just not understanding how the cache works, or the
> proper way to work with it.
>
> I use the ODMG api in a web application. I thought I had read here on
> the email list that the cache was used within a transaction but that
it
> was cleared after the transaction ended.

Only when using OJB within an j2ee conform application server the
cache has to be cleared by OJB.  I think in all other cases it has
to be done by the user.

> But I found that some of my
> dropdown boxes were not being updated because they were being pulled
> from the cache,

Think this was intended. But why was the cache not up to date?
Do other entities write to the database or do you use pure sql?

> eventhough they were being retreived within a separate
> transaction. This was unexpected.
>
> So I switched to using the ObjectCacheEmptyImpl until I understood
> caching better. But *even* *then* I found that objects were not always
> refreshed from the database. This was *totally* unexpected.

Indeed, that's strange. If you using OJB version <=0.9.9 this could
not happen.
In newer version the 'empty cache' implemetation use
a temporary map to support 'circular references', but this map was
cleared afterStore, afterDelete and before PB close.

regards,
Armin

>
> I finally had to put a broker.clearCache() just after opening my
> transactions in order to guarantee that I actually pulled from the
database.
>
> Clearly, I'm not doing or understanding something properly. I've read
> the cache html docs, but perhaps someone could talk about the cache
and
> how to work with it successfully.
> Thanks, Will
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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

Reply via email to