commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinicius Caldeira Carvalho <>
Subject Re: chains: refering to another chain in my chain
Date Mon, 04 Apr 2005 13:46:29 GMT

I tried this:
<command className="org.apache.commons.chain.generic.LookupCommand" 
name="validarRegraCompraPlanoCobertura" catalog="catalog"/>

but I get this when running the command:
java.lang.IllegalArgumentException: Cannot find default catalog
My catalog is registred as "catalog". I didn't get how could it not find 


Craig McClanahan wrote:

>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 name="doSomethingElse">
>>    <command name="doSomething"/> //inheirts everthing this chain provides
>>    <command name="boo" className="boo"/>
>>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:

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

View raw message