Gabriel Roldán wrote:
> Which reminds me I never seen in javadocs how the datastore api is supposed 
> to 
> behave under concurrent access, which, if not stated explicitly, it seems to 
> mean it is _not_ thread safe and client code should take care?
>   
Garbriel when you have finished updating the DataStore API for Java 5 
lets go over the javadocs. The API is
to be thread safe; with Transactions used to isolate work on a 
particular thread if needed.
> - if the api is meant to be thread safe
>   
A DataStore object is meant to be thread safe.
> - other details like if XXXFactory.createDataStore() should return the same 
> instance for the same parameters, and XXXDataStore.getFeatureSource(typeName) 
> returns the same instance for a given feature type, etc.
>   
It does not; it is the responsibility of the application to mange 
DataStore instances so two object are not competing for the same 
resource. We offer a utility class and some code examples on how to 
accomplish this:
- 
http://docs.codehaus.org/display/GEOTDOC/Managing+DataStores+using+Repository+or+Catalog
> I know both cases are left to implementors preference, yet explicitly stating 
> how the api should behave under concurrent access may change the preference. 
> Also it seems reasonable for the api to require being thread safe, so I guess 
> my point is just it is not clear enough.
>   
Agreed; we need to strip down the javadocs and focus on communication.
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to