commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: [chain] questions about various servlet/*Mapper classes
Date Thu, 03 Mar 2005 01:02:05 GMT
At 5:02 PM -0500 3/2/05, Howard Lin wrote:
>Thanks, I'll file a bug in the Bugzilla. It seems the problem is that
>in ChainProcessor, there is no need to save the catalog as a request
>attribute since CatalogFactory already had it,  it only needs to save
>the catalog name in the context so the next command can retrieve the
>catalog name and use that to retrieve the catalog. If CONFIG_ATTR is
>set, ChainProcessor should put that value in the context too so the
>next command can retrieve value of CONFIG_ATTR and get the catalog
>through the ServletContext. If this seems the right way to fix it, I
>can submit patches.

Again, I haven't used the ChainServlet or its siblings.  I was going 
to argue that, for backwards compatibility, the Catalog itself should 
be put in the request and the context, but then, it seems that no one 
would have ever been able to use it as released, so I'm not sure how 
much we should be worried about compatibility!

Still, I'm not sure I think it's bad to pass the Catalog object 
instead of its name in those places.  I'm not sure I can think of any 
particular reason to decide either way, although I guess it is one 
less step to retrieve a usable Catalog object than to get its name 
and look it up.

>  If CONFIG_ATTR is
>set, ChainProcessor should put that value in the context too so the
>next command can retrieve value of CONFIG_ATTR and get the catalog
>through the ServletContext.

This part I'm not really clear on at all; why would anything get the 
catalog from the ServletContext?  As written, the use of CONFIG_ATTR 
is to put the catalog in the chain Context so that other commands can 
use it to look up yet other commands?  This may not be necessary, as 
in general the generic command implementations that are part of 
commons-chain know how to use CatalogFactory, so they need only be 
configured with a catalog name.  But what type of code would retrieve 
a catalog from the ServletContext?  That's the part which I think is 
obsolete.

Can you clarify what you suggest doing?

Thanks
	Joe



-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message