commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sitze <rsi...@us.ibm.com>
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


Richard,

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.

Costin


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



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


Mime
View raw message