avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Aaron Farr <jaaronf...@yahoo.com>
Subject RE: New Fortress not working
Date Thu, 30 Jan 2003 15:56:32 GMT

--- Carsten Ziegeler <cziegeler@s-und-n.de> wrote:
> 
> Berin Loritsch wrote:
> > > However, Fortress's ContextManager doesn't put a "*" in the 
> > selector, all it
> > > puts is:
> > >        selector.put( "resource", resource );
> > 
> > Hmm.  that is a problem.  On two accounts:
> > 
> > In Fortress the default selection is "default".
> > 
> > It stems from no formal specs on what is the default.  We can easily
> > change what Fortress uses as the "default".
> > 
> > > And the Avalon framework DefaultServiceSelector which is the 
> > ServiceSelector
> > > called above in the SourceResolverImpl code doesn't handle "*". 
> >  It literally
> > > looks for a key "*" which doesn't exist.
> > > 
> > > Any suggestions?
> > 
> > Either update Fortress to use "*", or update SourceResolverImpl to use
> > "default".
> > 
> The change mentioned above equalizes the source factory handling which 
> means sources that wrap a URL are now handled in the same way as
> sources that allow access to jar files, webdav etc. This is a long
> wished feature which now finally got implemented.
> 
> Anyway, the source resolver needs to know what to do with a URI that
> has a protocol where no source factory has registered for, for example
> you don't want to register a factory for each protocol the jdk already
> supports (ftp, http, https etc.)
> 
> Therefore the source resolver searches for a default factory; I thought
> for this particular cases that "*" is a good choice, because a "real
> name", like default could also be used for a protocol. So I choose
> a name that is not a valid protocol name.
> So I guess updating fortress is the way to go.
> 
> 
> Carsten

So, if I'm following correctly, we'd need to change "default" to "*" in
AbstractContainer where the key/hint is set if no other value is given?  (I
think it's lines 294, 444, 496).  That's the only place where I can see what
Berin is referring to.

I'm not sure if this will completely solve the problem because as I'm following
the code, the m_manager ServiceManager variable in SourceResolverImpl only has
one entry in it at execution:  the "resource" entry set in the ContextManager
as mentioned above.  No other entries are present -- no "default" that I can
see.  Is it not being set or will it be magically returned somehow?  

I'm going to play with the code a bit but any illumination would be nice.

Thanks!
jaaron


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


Mime
View raw message