[Yanel-development] Some questions on bug 4985 (Implement chainof responsibility)

Josias Thöny josias.thoeny at wyona.com
Wed Nov 22 12:29:09 CET 2006


Hi Paloma,

We had a discussion about spring and we decided that we want to use it.
I think we could use spring also for the MapFactoryImpl issue. We could
specify the implementation class of the MapFactory in the spring xml
configuration file.

To me it looks like a better solution than the xerces approach.
Or what do you think?

Maybe you can have a look at the spring tutorial at
http://www.springframework.org/docs/MVC-step-by-step/Spring-MVC-step-by-step.html

This afternoon I will to try to add basic spring configuration for the
RepositoryFactory. 

josias


On Wed, 2006-11-22 at 12:09 +0100, Paloma Gomez wrote:
> > Paloma Gomez wrote:
> >
> >>Dear Michael,
> >>
> 
> >>However, this has nothing to do with some of the notes you wrote
> >> yesterday
> >>in the IRC, which makes me think that I might not have understood what
> >> you
> >>tried to explain. There were references to MANIFEST files
> >>
> >
> > Currently the MapFactoryImpl is hardcoded within MapFactory and should
> > actually
> > be retrieved through a MANIFEST or something like this similar to Xerces
> > is being loaded
> > dynamically and not hardcoded withi xml-apis
> 
> I have had a look at the way classes are loaded in Xerces. Xerces provides
> an implementation of javax.xml.parsers.SAXParserFactory in
> org.apache.xerces.jaxp.SAXParserFactoryImpl. In order to allow the dynamic
> loading of the class, javax.xml.parsers.SAXParserFactory#newInstance()
> invokes
> 
> [code]
> return (SAXParserFactory) FactoryFinder.find(
>                 /* The default property name according to the JAXP spec */
>                 "javax.xml.parsers.SAXParserFactory",
>                 /* The fallback implementation class name */
>                 "org.apache.crimson.jaxp.SAXParserFactoryImpl");
> [/code]
> 
> javax.xml.parsers.FactoryFinder.java is a package private class that
> contains methods to find the appropriate class loader, find the
> implementation of an abstract class or interface and create an instance of
> the implementing class. This class is also used by
> javax.xml.parsers.DocumentBuilderFactory and is duplicated for each JAXP
> subpackage.
> 
> I would like to know if I should implement a similar class or I should
> include the code in MapFactory.java. I guess that it is better to keep
> things separated, isn't it?
> 
> Thanks,
> 
> Paloma
> 
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
> 




More information about the Yanel-development mailing list