On 13-Mar-07, at 7:50 PM, Martin Desruisseaux wrote: > Jesse Eichar a écrit : >> From what I understand they aren't currently singletons but we >> want them to be isn't that more correct? > > RegistryFactory are not currently singleton. We may want them to > be, this is one possible approach but not the only one. > >> So my question is where to go from here. It seems you want to >> create two main singletons: >> - FactoryRegistry >> - JNDI > > > Those classes already exists. My proposal: > > * Jody hacks JNDI as he wish. > * I just move the 'add/removeFactoryIterator(...)' methods out > of FactoryRegistry and put them as static methods into a new > "Factories" class instead. No need to turn FactoryRegistry > into a singleton.
I know the classes exist but what I understood from Jody's summary is that the two of you wanted both to be singletons. If we start having a number of singletons in the system then it would be beneficial to have a Single location for obtaining all of them. There are two reasons for this: 1. It is easier for users to know where to look for the singletons of the system 2. Singletons are bad since we may want multiple geotools systems to run in a single JVM (J2EE apps for example) and not interfere with one another. Putting the singletons in a single location also allows us to change only a single class when we want to update for the case where the singletons aren't static final references. Jesse ------------------------------------------------------------------------- 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
