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(ComplexElemen
tHandler.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(XMLNamespaceB
inder.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