You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2004/05/19 09:30:47 UTC
[IMP] Something is wrong with out stores
The more I look into this store problem, the more I get confused.
I think I understood from Sylvains explanation that the persistent
store should only be used by our store as a back up.
Looking through our code, I found out, that some components
still use the persistent store:
- StatusGenerator
- ClearPersistentStoreAction
- EventAwareCaching
So, should we simply change them to use the store?
Carsten
Carsten Ziegeler
Open Source Group, S&N AG
http://www.osoco.net/weblogs/rael/
RE: [IMP] Something is wrong with out stores
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Upayavira wrote:
>
> Carsten Ziegeler wrote:
>
> >The more I look into this store problem, the more I get confused.
> >
> >I think I understood from Sylvains explanation that the persistent
> >store should only be used by our store as a back up.
> >Looking through our code, I found out, that some components
> still use
> >the persistent store:
> >- StatusGenerator
> >- ClearPersistentStoreAction
> >- EventAwareCaching
> >
> >So, should we simply change them to use the store?
> >
> >
> Well, no. Surely the StatusGenerator is telling you the state
> of the persistent store, the ClearPersistentStoreAction is,
> well, need I say (not sure about the EventAwareCaching).
> Probably what Sylvain was saying is that nothing stores
> objects directly into the persistent store, they all go via
> the default store. But, for status, etc, reasons, it seems
> okay to me to access the persistent store directly.
>
Sure, but with JCS/EHCache we don't have a persistent store
anymore as the "store" has the two-phase caching already
implemented.
Carsten
Re: [IMP] Something is wrong with out stores
Posted by Upayavira <uv...@upaya.co.uk>.
Carsten Ziegeler wrote:
>The more I look into this store problem, the more I get confused.
>
>I think I understood from Sylvains explanation that the persistent
>store should only be used by our store as a back up.
>Looking through our code, I found out, that some components
>still use the persistent store:
>- StatusGenerator
>- ClearPersistentStoreAction
>- EventAwareCaching
>
>So, should we simply change them to use the store?
>
>
Well, no. Surely the StatusGenerator is telling you the state of the
persistent store, the ClearPersistentStoreAction is, well, need I say
(not sure about the EventAwareCaching). Probably what Sylvain was saying
is that nothing stores objects directly into the persistent store, they
all go via the default store. But, for status, etc, reasons, it seems
okay to me to access the persistent store directly.
Upayavira
RE: [IMP] Something is wrong with out stores
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Sylvain Wallez wrote:
>
> StatusGenerator explicitely display information about the
> various stores, and as Upayavira said
> ClearPersistentStoreAction clears, well...
> the persistent store.
>
:)
> So it can be considered legal for them to access the
> persistent store *if it exists*. We should just test this
> using manager.hasService() to ensure proper operation when no
> persistent store exists (StatusGenerator already has some
> protection for this).
>
Sounds reasonable, will add it.
> As for EventAwareCaching, it seems I forgot it during the
> cache cleanup, and it should use the regular Store.ROLE
> instead of using directly the persistent store.
>
Thanks
Carsten
Re: [IMP] Something is wrong with out stores
Posted by Sylvain Wallez <sy...@apache.org>.
Carsten Ziegeler wrote:
>The more I look into this store problem, the more I get confused.
>
>I think I understood from Sylvains explanation that the persistent
>store should only be used by our store as a back up.
>Looking through our code, I found out, that some components
>still use the persistent store:
>- StatusGenerator
>- ClearPersistentStoreAction
>- EventAwareCaching
>
>So, should we simply change them to use the store?
>
>
StatusGenerator explicitely display information about the various
stores, and as Upayavira said ClearPersistentStoreAction clears, well...
the persistent store.
So it can be considered legal for them to access the persistent store
*if it exists*. We should just test this using manager.hasService() to
ensure proper operation when no persistent store exists (StatusGenerator
already has some protection for this).
As for EventAwareCaching, it seems I forgot it during the cache cleanup,
and it should use the regular Store.ROLE instead of using directly the
persistent store.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: [IMP] Something is wrong with out stores
Posted by Geoff Howard <co...@leverageweb.com>.
Carsten Ziegeler wrote:
> The more I look into this store problem, the more I get confused.
>
> I think I understood from Sylvains explanation that the persistent
> store should only be used by our store as a back up.
> Looking through our code, I found out, that some components
> still use the persistent store:
> - StatusGenerator
> - ClearPersistentStoreAction
> - EventAwareCaching
>
> So, should we simply change them to use the store?
That should be fine for EventAwareCaching. IIRC the reason I had it use
persistent store directly is that it is used at shutdown to persist the
cache/event correlation information between runs and it made more sense to me at
the time to go directly into permanent storage. Thanks for working on this.
Geoff