Thanks Andrea and Jody for your response. 

I will try to take a look into catalog and uDig source despite of i'm not 
familiar with RCP and Eclipse plugins at all. In fact I wasn't aware that uDig 
(and maybe GeoServer I guess) was the only known application which uses WFS 
geotools plugin. It's a little strange since there's no other free Java lib for 
that.

BTW with my factory I was simply using a Map as a cache for datastores (URL was 
used as key). Looking into WFSDataSourceFactory.createDataStore() source and I 
see that there's already a cache, implemented by a Map too (all datastore 
params, not only the URL, are used as key). Anyway my factory was using 
WFSDataSourceFactory.createNewDataStore() which ignores the cache, so I was not 
doing a cache over a cache. ;-)

Nevertheless I really think there's something weird about 
WFSDataStore/FeatureStore. I don't speak about concurrency but just about side 
effects on sequential operations on differents feature types.
I will try to contact dzwiers, who seems to be the WFS geotools plugin 
maintener, to help me to solve it.

Regards,

Vincent.

-----Message d'origine-----
De : Jody Garnett [mailto:[EMAIL PROTECTED]
Envoyé : mardi 6 mars 2007 19:35
À : Andrea Aime
Cc : zze-M2S FRISON V ext RD-BIZZ-SOP; [email protected]
Objet : Re: [Geotools-gt2-users] DataStore factory

Andrea Aime wrote:
> zze-M2S FRISON V ext RD-BIZZ-SOP ha scritto:
>  
>> Hi,
>> 
>> For now the only solution I have if I want to perform different
>> queries on different feature types is to recreate a new DataStore and
>> a new DataStore for each new request! :(
>>    
> As far as I know udig is using just one instance of datastore for
> multiple layers, but I may be wrong (not very familiar with udig internals).
>  
This is the case Andrea.

The DataStore API really would like to to keep them as singletons, or in a 
catalog (as uDig and GeoServer do).  There is a very simple example in GeoTools 
called Registry that slurps up all the shapefiles in a directory. But you can 
do something as simple as keeping your data connections in a java.util.Map.
>> Of course it's temporary workaround because it's disastrous for
>> performances.
>> 
>> Well, I guess I'm not the first one who want to keep in memory a
>> DataStore object (with its different FeatureStore objects) across
>> different queries. Nobody could help me pleaaaase?
>>    
> Vincent, from what I know, only udig is using the WFS data store, so
> you're unfortunately the first hitting it in the wild....
>
> Also, it seems the datastore mantainers are too flooded with work to
> provide you any help... so, the only tangible help I can give you, is
> to point you to the developer guide and suggest you try to debug the
> datastore yourself :( http://docs.codehaus.org/display/GEOT/Home
>
> If you have patches, we'll gladly accept them :-)
>  
I thought this was more of an issue with creating multiple concurrent 
datastores then specific problems with WFS.



-------------------------------------------------------------------------
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-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to