cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Antwort: RE: ExtendedComponentSelector not ThreadSafe
Date Thu, 06 Nov 2003 09:00:20 GMT

>Volker Schmitt wrote:
>> If two Threads or the same Thread lookup the same hint twice only one
>> reference is hold inside the HashSet and the release of the second
>> Component fail.
>> My first idea was first try to release the Component to the parent and
>> fail call super.release(). In difference to the lookup a release doesn't
>> fail if a CM or CS can't release a Component, it only log a WARN.
>> A solution is using a "org.apache.commons.collections.MultiHashMap"
>> in addition needs to be synchronized.
>> What do you think.
>What about a org.apache.commons.collections.Bag ?

Sounds great. But we need a implementation ;-) HashBag ?

Another solution is to add a protected Method to ExcaliburComponentSelector

canRelease(Object Component) {
      return m_componentMapping.get( component ) != null;



View raw message