Now that I am sure FactoryRegistry is caching instances the code for the 
FactoryFinder implementations are a lot more clean ... and with the 
global Hints actually useful.

Here is an example:
>   private static FeatureCollections instance() {
>       // depend on CommonFactoryFinder's FactoryRegistry to hold singleton
>       return CommonFactoryFinder.getFeatureCollections( 
> GeoTools.getDefaultHints() );
>   }
Basically I have been able to remove the "instance" field from the 
FactoryFinders and actually back them onto the FactoryRegistry/Hint 
system.  Because FactoryRegistry caches according to Hints used (and 
only if the Hint is used) changing your global hints (say from the 
default provided by the System properties to something provided by 
GeoServer) will actually get picked up.

Cheers,
Jody

Jody Garnett wrote:
> This work is now compled - and FactoryFinder is removed. Removing 
> instructions for use from the wiki.
>
> Jody
>   
>> The only real evidence of an organized approach using system properties
>> is in the old Factory implementation, where a system property could
>> override anything:
>>   
>> This implementation is still referenced from:
>> - FeatureLockFactory
>> - FileDataStoreFinder
>> - AttributeTypeFactory
>> - FeatureCollections
>> - FeatureTypeBuilder
>> - FilterFactoryFinder
>> - FilterNameTypeMapping
>> - StyleFactoryFinder
>>
>> I will add these to CommonFactory finder for and then clean up the
>> utility methods.
>>
>> 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
>>   
>>     
>
>
> -------------------------------------------------------------------------
> 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
>   


-------------------------------------------------------------------------
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

Reply via email to