commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <>
Subject Re: chains: refering to another chain in my chain
Date Fri, 01 Apr 2005 19:18:56 GMT
On Apr 1, 2005 9:12 AM, Vinicius Caldeira Carvalho
<> wrote:
> Hello there folks...
> Isnt it possible to refer to a chain as a command from another chain?
> let me explain:
> <chain name="doSomething">
>     <command name="foo" className="foo"/>
>     <command name="bar" className="bar"/>
> </chain>
> <chain name="doSomethingElse">
>     <command name="doSomething"/> //inheirts everthing this chain provides
>     <command name="boo" className="boo"/>
> <chain>
> I think this would be a great adition to the api

It doesn't need to be in the API ... there needs to be a command that
looks up and executes other chains.  Oh wait, there already is :-)

    <command className="org.apache.commons.chain.generic.LookupCommand"
        name="doSomething" [ catalog="catalogName" ] [ optional="true" ] />

This uses the catalog and name identifiers to look up some other
defined command and executes it.  The optional parameter lets you say
"if the command doesn't exist, just silently continue instead of
throwing an error."  This is perfect for letting people optionally
customize a chain without having to reconfigure it.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message