> Hi,
> following problem:
> I'm just implementing a new component (StoreJanitor).
>
> I inserted a new role in the cocoon.roles:
> <role name="org.apache.cocoon.components.store.StoreJanitor"
> shorthand="store-janitor"
> default-class="org.apache.cocoon.components.store.StoreJanitorImpl"/>
>
> I lookup this role in the MRUMemoryStore:
> getLogger().debug("Looking up " + StoreJanitor.ROLE);
> this.storejanitor = (StoreJanitor)manager.lookup(StoreJanitor.ROLE);
>
> Then I want to call a method in the configure() method of the MRUMemoryStore
> this.storejanitor.register(this);
>
> The problem is that the MRUMemoryStore is instanced twice (for the EventCache
> and the StreamCache) and with the implementation above the StoreJanitor twice too.
> But I want that the StoreJanitor is a "Singelton" and every Store instance
> can register to this class.
> How can I implement with Avalon such singelton classes?
I'm just a bloody beginner but AFAI understood: if the StoreJanitor implements
ThreadSafe (don't know if this is possible) there should be only ONE instance
--
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]