(I am still just looking at examples.. still not sure how to write a "hello world" chain)
There are two distinct things going on.
Commons Chain is a general-purpose implementation of the Chain of Responsibility pattern. It could be used by any Java application, library, or framework that needed to implement a Chain of Responsibility.
Once likely suspect for a Chain of Responsibility is the Struts RequestProcessor. So, as a proof of concept, we're working on a Struts Chain RequestProcessor. The goal here is to be able to plug it into Struts like any other RequestProcessor, without any Struts API changes. Then, at some point, we'd be likely to make Struts-Chain the default RequestProcessor, since it is more extensible than the 1.1 version.
To use Commons Chain in an application, you create a Context and pass it to a Command. The Command can then do whatever you like, including adding a "hello world" entry to the Context. The Context is then returned the caller.
In a web application, the context could simply be added to the request context, or used to populate an ActionForm or some other JavaBean.
In the web package of Chain, there is a generic Servlet and a generic Listener class that can be used to load a Catalog of Commands into application-scope. Then, all the Action has to do is lookup a given Command Chain in the Catalog, invoke it with the desired context, and place the result in request or session scope. Another approach would be to use the ServletWebContext, so that any changes the Command makes to the Context are reflected in request scope.
But, right now, both Struts-Chain and Commons-Chain are in the sandbox, mainly because we haven't finished doing the hello world examples :)
-Ted.
-- Ted Husted, Junit in Action - <http://www.manning.com/massol/>, Struts in Action - <http://husted.com/struts/book.html>, JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

