You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Marco Mistroni <mm...@waersystems.com> on 2005/04/05 10:03:51 UTC

Configuring Catalogs via Spring

Hello all,
	Does anybody know how to configure a commons chain catalog via 
Spring using XML file?
I had a look at code, and the only component that configures catalog via
XML is the ChainListener.
And, if I use CatalogFactory, I have to add commands programmatically

How can integrate then Spring and Chains, if I don't want to use
Listener?

Thanx and regards
	marco




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


Re: Configuring Catalogs via Spring

Posted by Duong BaTien <du...@gmail.com>.
Marco Mistroni wrote:

>Hello all,
>	Does anybody know how to configure a commons chain catalog via 
>Spring using XML file?
>I had a look at code, and the only component that configures catalog via
>XML is the ChainListener.
>And, if I use CatalogFactory, I have to add commands programmatically
>
>How can integrate then Spring and Chains, if I don't want to use
>Listener?
>
>Thanx and regards
>	marco
>
>
>  
>
I extend Catalog and Chain implementations to wrap the commands with 
generic Map and List so they become standard POJO, configurable by 
Spring IoC.

BaTien
DBGROUPS

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


Re: Configuring Catalogs via Spring

Posted by Craig McClanahan <cr...@gmail.com>.
On Apr 5, 2005 1:03 AM, Marco Mistroni <mm...@waersystems.com> wrote:
> Hello all,
>         Does anybody know how to configure a commons chain catalog via
> Spring using XML file?
> I had a look at code, and the only component that configures catalog via
> XML is the ChainListener.
> And, if I use CatalogFactory, I have to add commands programmatically
> 
> How can integrate then Spring and Chains, if I don't want to use
> Listener?
> 

The code in ChainListener that actually does the XML configuration is
pretty straightforward, and can be used to configure the chains
however you'd like:

    ConfigParser parser = new ConfigParser();
    URL url = ... URL to your configuration document ...
    parser.parse(url);

> Thanx and regards
>         marco

Craig

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