commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sitze <>
Subject Re: [discovery] Take III
Date Fri, 30 Aug 2002 19:15:45 GMT
Properties files are Resources that are not ResourceNames

Operations are Resource are getClassLoader(), getResource() and 
getResouceAsStream()  [so, Resource is strongly tied to ClassLoader].

The additional operation on ResourceClass is loadClass(), which internally 
invokes ClassLoader.loadClass() only if it doesn't already have the 
Class..  This operation doesn't make sense for the more general Resource.

Richard A. Sitze
IBM WebSphere WebServices Development


Can you think of some cases where we may have a different kind of 
Resource ( other than a name or a class ) ? My feeling is that 
a discovered resource will fundamentally be a string extracted from
some META-INF directory or some file - with a very common use 
as a class name. I can't imagine any 'typical' use of Discovery 
for something else. 

My point is that it makes a lot of sense to just have a single
object, Resource. It can be later expanded, but discovery 1.0 would
be much easier to use.

Also, 2 interfaces/abstract classes - ResourceDiscover and a SPI to be 
implemented by all o.a.c.d.resource.names/classes. 

I can live with the current model - I'm just trying to see if 
we can get one step simpler.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message