And an equal amount of trouble is caused by users calling dispose() on a 
shapefile DS, not knowing it is cached, and blowing away open locks if 
something else has it open as well. GEOT-2569 shows what happens if we 
throw finalizers into the mix. Hairy.

Jody Garnett wrote:
> I thought we addressed this already? Perhaps only on trunk ...
> 
> The good reason was that we were unable to trust our user community to
> hold onto a datastore instance; and two datastores both attacking the
> same shapefile can result in some trouble.
> 
> Jody
> 
> 
> On Wed, Jul 1, 2009 at 6:41 PM, Andrea Aime<[email protected]> wrote:
>> Hi all (hey Jesse),
>> the current shapefile datastore factory has this nasty habit of
>> caching the returned datastores so that the hitting it twice
>> with the same parameters will return the same datastore.
>>
>> This seems downright wrong, it's not depanded by the datastore
>> SPI and breaks disposing shapefiles.
>>
>> So I was wondering, before I go and wipe out the caching, was
>> there any good reason to have it in the first place?
>> Imho it's the job of the application using the stores to
>> cache them if there is a need to (GS does for performance,
>> but then again, properly manage their lifecycles as well).
>>
>> 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
>>
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 


-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer, CSIRO Exploration and Mining
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to