atom feed8 messages in org.apache.commons.devRe: [chain] New interface: CatalogFac...
FromSent OnAttachments
Sean SchofieldSep 30, 2004 12:23 pm.java
Craig McClanahanOct 2, 2004 12:25 pm 
Sean SchofieldOct 5, 2004 7:38 am.patch
Craig McClanahanOct 5, 2004 10:38 am 
Sean SchofieldOct 5, 2004 1:26 pm 
Craig McClanahanOct 5, 2004 1:42 pm 
Sean SchofieldOct 5, 2004 2:29 pm 
Sean SchofieldOct 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