On Wed, 20 Jun 2001, SCHACHTER,MICHAEL (HP-NewJersey,ex2) wrote:

> Buenos Tardes,
> 
> I was thinking it'd be cool to use digester to parse the resources
> configuration
> file (attached) in conjunction with BeanUtils.
> 
> This would make the java-bean like properties of any resource dynamically
> configurable according to the config file, like in Struts.
> 
> Does anyone have any objections to making resources be dependant on Digester
> and BeanUtils?  If so, I probably wouldn't have too much of a problem just
> doing straight up DOM stuff, just didn't want to re-invent the wheel, so to
> say.
> 
> Also, if necessary, I can abstract the configuration reading process so that
> it doesn't need to read the resources-config.xml, it could read whatever you
> implement it to.  Personally, I don't like that idea because the more
> different
> ways there are to describe a resource within a file the more difficult it
> becomes
> to understand to newcomers.  If we went this course there would be a generic
> 
> configuration reader that depends on the resources-config.xml file.
> 
> I'm in the process of finishing this stuff off now, I'll check in some
> prelimary
> code now for people to look at, with the idea that it can be reverted back
> to
> it's old state through CVS if objected to.
> 
> 

To be precise, you're actually talking about making a particular
*implementation* of the resource APIs dependent on Digester, right?  We're
not saying that they all have to.

If that's the case, I see no problem at all in creating an XmlResources
implementation of the general Resources APIs for this purpose.  If we want
to make the build process for resources a little easier, you can even
teach Ant to compile these implementation classes only if Digester and
Beanutils are available on the classpath, although anyone who's building
Resources from scratch is probably going to have all the other sources
available as well.

Craig


Reply via email to