Andrea Aime ha scritto: > Hum, this is more or less what I did in fact, sorry if that wasn't clear > from the beginning. I created a factory iteratory provider backed > directly by Sextante.getAlgorithms. > But, I used GeoTools.addFactoryIteratorProvider instead, and ended up > with the problem I described. > FactoryIteratorProviders is package private, so I cannot use it, but > GeoTools.addFactoryIteratorProvider calls it directly.
To provide more details, what is happening is that FactoryRegistry.register(iterator, category, message) sort of "canonicalizes" the factories returned by the provider, if a registered factory has the same class as one returned by the iterator, the registered will be used instead, making it impossible to have multiple instances of the same class appended to the registry. The whole thing uses the getServiceProviderByClass(Class) method, which returns the one and only factory instance registered for a certain factory class... Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
