commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "richard head" <>
Subject Chain of Responsibility Catalog, Adding Command Element Attributes
Date Mon, 16 Jul 2007 21:57:39 GMT

I’ve been playing around with the Commons Chain of Responsibility 
implementation and have a question or two. Maybe a chain is not the right 
approach, I’d appreciate any suggestions.

	I’d like to make a Chain that retrieves an XML document, transforms it, and 
emails the results.  3 Commands as I see it. Each of these Commands requires 
information that is independent of the others. XML file’s URL, XSLT 
transformation’s output path, SMTP server etc…

I understand that the preferred method of retaining state is to use the 
Chain’s Context. Yet in this situation is seems inflexible, as the class 
instantiating the chain will be tightly bound to it because it would have to 
anticipate each link and what each link’s Context requirements are.

What I would like to do is use a catalog.xml file to store the chain, and 
add the appropriate attributes to the given command element.

i.e. <command name="EmailUser" className="" 
smtpServer=”” .../>

In order to achieve such functionality, what would I have to do, set the 
appropriate rules in the ConfigParser’s Digester?


I would prefer to do this via the Emailer’s constructor, but it appears that 
it’s not possible and one must use getters and setters.

Thank You.


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

View raw message