Jesse Eichar wrote: > From what I understand they aren't currently singletons but we want > them to be isn't that more correct? Well I don't always get what I want ... FactoryRegistry is held as a singleton by a couple FactoryFinder classes (RefereningFactoryFinder has one, and CommonFactoryFinder has one) - they should all use the same instance but this is and easy fix (providing we figure out who can hold the value for us).
JNDI is already a proper singleton. >> Both these classes have some required "set up" prior to us using >> GeoTools for the first time. >> >> Here is where we are at with FactoryFinder: >> - CommonFactoryFinder currently maintains its own FactoryRegistry >> singleton >> - FactoryFinder (really is a ReferencingFactoryFinder) also has its own >> FactoryRegistry singleton > FactoryFInders are currently the singletons and each one contains a > FactoryRegistry. No instances of FactoryFinder are created - they all just have static methods. >> So here is what we need to do: >> - We need to make sure all the FactoryFinders use the same >> FactoryRegistry >> - Set up the common FactoryRegistry once (that is add the >> FactoryIterators) >> - We need to allow an application to set the default JNDI context for >> the library (in case two applications use GeoTools we cannot have them >> trip over each other) > I agree with those points. Is there already an existing SPI > FactoryIteratorProvider? Or do we need to factory that out into its > own class. Had not thought of that - taking it out into its own class would be an idea. > So my question is where to go from here. It seems you want to create > two main singletons: > - FactoryRegistry > - JNDI > > Perhaps we can create a class ala eclipse's Platform object which > provides access to the singletons of the system. Maybe we can call it > Geotools. Also who is slated to do this work you? I can do this work; but am not always effective when getting this far down in the library. I suspect collaboration with Martin is in order. I can take the next step and write up a proposal though. Cheers, Jody ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
