commons-user mailing list archives

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

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

Thanks


Craig McClanahan wrote:

>On Apr 1, 2005 9:12 AM, Vinicius Caldeira Carvalho
><vinicius.carvalho@squadra.com.br> 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.
>
>Craig
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message