cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Singleton Component?
Date Mon, 29 Oct 2001 14:11:20 GMT
Ovidiu Predescu wrote:
> 
> Is it possible to create a Component which is a singleton? I can
> implement the singleton myself but I was hoping to reuse an already
> implemented pattern from Avalon.

Extend the following interface:

org.apache.avalon.framework.thread.ThreadSafe

This will share one instance between all Components in the CM.
WARNING: You better make sure that the Component is indeed ThreadSafe
or you will experience run-time anomolies.

Good thing for you, Avalon provides a number of Locks, Mutexes
Semaphores, ThreadBarrier, and other concurrency management tools.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message