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! :(
 
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?
 
Regards,
 
Vincent.

________________________________

De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de zze-M2S FRISON V 
ext RD-BIZZ
Envoyé : lundi 5 mars 2007 15:30
À : [email protected]
Objet : [Geotools-gt2-users] DataStore factory



Hello, 

I'd like to understand in wich way a DataStore object (and its relative object 
such as FeatureStore/FeatureSource or FeatureType) could be shared across 
different queries.

I have several layers and each of them keep a DataStore, a FeatureStore and a 
FeatureType. All of these 3 objects are stored as instance attribut of my Layer 
class.

I have problems as soon as I try to insert feature into *different* feature 
types. In this case, the following exception is raised:

 java.util.NoSuchElementException    
org.geotools.xml.filter.FilterComplexTypes$ServiceExceptionType.getValue(FilterComplexTypes.java:1668)

    
org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexElementHandler.java:156)
 
    org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:264) 
    
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)
 
    
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinder.java:897)
 
If I sniff my network I can see that geotools send empty <Insert></Insert> tags 
inside the <Transaction> query! 

I have a factory which provide WFSDataStore as singleton. "Singletonize" the 
DataStore is a good idea or it is not? I guess it would be better (less local 
ressources and less network traffic with only one GetCapabilities request). But 
are DataStore objects fully synchronized and thread safe?

But note that even if I tried to use a "new instance" factory instead of a 
singleton one, I have the same problems as soon I insert features which have 
different types (always the same error with empty <insert>). It's really crazy 
because my two layers owns their own objects (DataStore, FeatureType and 
FeatureSource/Store). I really can't figure out how side effects could happen 
since my objects are differents ones!

Thanks a lot for your help, 

Vincent. 

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