commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Schofield" <sean_schofi...@schof.com>
Subject Re: [chain] New interface: CatalogFactory
Date Tue, 05 Oct 2004 14:38:54 GMT
Craig,

Thanks for commiting the file.  I agree that this might be the best way 
to generate discussion.  I've answered some of your points below.

>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].  
>  
>
Sorry about the nonconforming javadoc.  I did my best to conform to the 
style.

>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?
>  
>
I agree.  I had started wondering about this myself.  I definitely plan 
on having it in my implementation as you point out.  I've attached a 
patch that removes this.  The patch also fixes a problem with excessive 
line spacing.  I'm not sure if it was on my end or your end but the 
source file had an "extra" space for every line.  The patch addresses 
that as well.

>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)?
>  
>
Hmmm you seem to be pointing out something that I was not aware of.  If 
I understand you corectly, you are saying that classes contained in a 
jar in the server's classpath (ex. server/lib) vs. the application 
classpath, then that class will be the one used by every application on 
the server.  Is that right?  If so, then a static class loaded by the 
server container is what will be referenced by all applications using 
that class.

I had not thought of that.  I'm not sure that this is a a deal breaker 
though.  People wishing to deploy the chain.jar at the server level will 
just need to be aware that they should probably not use the "default" 
catalog.  If each application adds their catalog with a unique name, 
there should not be a problem right?

sean

Mime
View raw message