Ok, in fact we are using the api correctly, creating a new FeatureStore
on every request and passing a thread-local transaction to it (sorry for
the confusion).
Despite that we still get this error occasionally:
Caused by: java.lang.IllegalArgumentException: Transaction already has
an entry for key:110m_populated_places_simple. Please check for existing
State before creating your own.
at
org.geotools.data.DefaultTransaction.putState(DefaultTransaction.java:98) ~[gt-main-2.7.5.jar:na]
at
org.geotools.data.store.ContentState.setTransaction(ContentState.java:192)
~[gt-data-2.7.5.jar:na]
at
org.geotools.data.store.ContentEntry.getState(ContentEntry.java:133)
~[gt-data-2.7.5.jar:na]
at
org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:310)
~[gt-data-2.7.5.jar:na]
at
org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:287)
~[gt-data-2.7.5.jar:na]
at
org.geotools.data.store.ContentFeatureCollection.<init>(ContentFeatureCollection.java:121)
~[gt-data-2.7.5.jar:na]
On 8/02/2013 10:25, Andrea Aime wrote:
On Fri, Feb 8, 2013 at 10:17 AM, Jan De Moerloose
<[email protected] <mailto:[email protected]>>
wrote:
After digging a bit further, i reformulated my problem (and a
possible solution) here:
http://jira.codehaus.org/browse/GEOT-4388
The main issue is that ContentFeatureSource itself is evidently
not thread-safe (and not claiming to be), but could perhaps be
with some modification ?
Not it's meant to be, see my comment in the issue. If you are sharing
a FeatureStore among threads you're misusing the API.
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
--
Sincerely,
Jan De Moerloose
Geosparc n.v.
http://www.geosparc.com
sponsor of http://www.geomajas.org
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users