| From | Sent On | Attachments |
|---|---|---|
| Sean Schofield | Sep 30, 2004 12:23 pm | .java |
| Craig McClanahan | Oct 2, 2004 12:25 pm | |
| Sean Schofield | Oct 5, 2004 7:38 am | .patch |
| Craig McClanahan | Oct 5, 2004 10:38 am | |
| Sean Schofield | Oct 5, 2004 1:26 pm | |
| Craig McClanahan | Oct 5, 2004 1:42 pm | |
| Sean Schofield | Oct 5, 2004 2:29 pm | |
| Sean Schofield | Oct 5, 2004 3:52 pm | .java |
| Subject: | Re: [chain] New interface: CatalogFactory | |
|---|---|---|
| From: | Craig McClanahan (crai...@gmail.com) | |
| Date: | Oct 2, 2004 12:25:47 pm | |
| List: | org.apache.commons.dev | |
On Thu, 30 Sep 2004 15:23:42 -0400, Sean Schofield <sean...@schof.com> wrote:
Attached is the new CatalogFactory interface that I proposed a while back. I welcome any comments, concerns or objections. I will be providing a default implentation (as Craig has suggested) but I'd like to get feedback on the interface first.
Thanks, sean
Hi Sean,
I've committed your proposed CatalogFactory.java interface to [chain], with minor tweaks to the Javadoc comments to conform to the usual style in [chain]. I've got a couple of questions to start with.
The getInstance() method seems out of place here ... in most factory pattern implementations I've seen, this would actually be a public static method on an implementation of CatalogFactory. What kind of use cases do you see for it here?
Also, your original motivation was to disconnect catalog lookups from something like the ServletContext attribute that ChainListener (containing a Catalog) sets up. How are you proposing to do this disconnect -- I presume it's something in the actual implementation of CatalogFactory? If so, will your proposed solution work when commons-chain.jar is included either in the WEB-INF/lib directory, and when it's installed in the servet container (thus making static variables global across webapps)?
Craig






.java