We just don't use it, but it turns out that simply having it available
causes performance bottlenecks under load (see HIVEMIND-162).  Removing
pieces that I don't use because they have performance impacts strikes me
as one of the big benefits of a configurable infrastructure like
Hivemind/Tapestry provide.

jeff
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kent Tong
Sent: Wednesday, December 07, 2005 8:49 AM
To: [email protected]
Subject: Re: Removing elements from configurations

Jeff Lubetkin <jefflub <at> zillow.com> writes:

> I'd like to remove the "client" related
> persistence strategies from the PersistenceStrategy configuration
point. 

Why do that?

> The only way I've figured out how to do this is to effectively
recreate a
> bunch of the tapestry configuration so that I can construct a new
instance of
> the RequestCycleFactory that has my persistence config, then
contribute that 
> to InfrastructureOverrides.  It just feels like there must be a
simpler way
> to do this, but I can't figure it out.  Is there any way for a
> downstream config file to remove config items from a configuration
point, or
> override the list entirely?

Have you tried overriding the PropertyPersistenceStrategySource
implementation:

<implementation 
  service-point="tapestry.persist.PropertyPersistenceStrategySource">
  <invoke-factory service-id="hivemind.BuilderFactory" model="singleton"
>
    <construct class="MyPropertyPersistenceStrategySource" >
       <set-configuration configuration-id="PersistenceStrategy" 
            property="contributions" />
    </construct>
  </invoke-factory>
</implementation>

class MyPropertyPersistenceStrategySource 
  extends PropertyPersistenceStrategySourceImpl {

    public void setContributions(List contributions)
    {
        List adjustedContributions = new ArrayList(contributions);
        //remove the PropertyPersistenceStrategyContribution whose
        //getName() returns a string starting with "client".
        super.setContributions(adjustedContributions);
    }
}

--
Author of a book for learning Tapestry
(http://www.agileskills2.org/EWDT)


---------------------------------------------------------------------
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