> The question is, how will I do that? How can I hook up a command to
> spring?
Commons CoR ships with an object loader that uses the Commons
Dispatcher to create a Catalog (or repository) of Commands. But that's
not the only way to create a Catalog. You could also use Spring to
load your Chains, and inject into the Chain, Commands, or Context
whatever dependencies you need. Here's the sort of thing I do with
Spring.NET and a C# port of CoR:
<object id="ListByChain" type="Agility.Core.Chain">
<property name="AddCommands">
<list>
<ref object="ListByKeyInput"/>
<ref object="ListByKey"/>
<ref object="ListByKeyOutput"/>
</list>
</property>
</object>
Or, you might want to do is think of the Context as a Spring Bean. Add
JavaBean properties to a base Context, and instantiate that through
Spring, and populate from the ActionForm.
HTH, Ted.
On Thu, 31 Mar 2005 11:13:08 +0100, Marco Mistroni
<[EMAIL PROTECTED]> wrote:
> Hello Ted,
> I have one additional question about Struts Chain , MailReader
> etc..
> Suppose that I want to use Spring beans...
> Currently, with Struts 1.1, my action are extending
> DelegatingActionProxy because actions are meant to use those beans.
> If I use Commons Chain, then what is currently in the action will be
> abstracted by Command/Context, correct?
> So from that it follows that I should be able to retrieve spring beans
> From command.
> The question is, how will I do that? How can I hook up a command to
> spring?
>
> Thanks in advance for your reply, please post also to the list if you
> think
> It's valuable...
>
> Regards
> marco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]