On Mon, Jul 25, 2011 at 12:33 PM, Jon Britton <[email protected]> wrote: > Hi, > I'm using the Geotools WFS plugin to retrieve a list of WFS layers from my > server. When I first call "data = (WFSDataStore) > DataStoreFinder.getDataStore(connectionParameters);" it creates a > GetCapabilities request to my WFS server (it shows in the server logs). > However, when I try this a second time no GetCapabilities request is made > (it doesn't appear in my server logs, anyway), so I assume the previous > results are being used. > Is there any way I can make Geotools make a GetCapabilities request every > time I call getDataStore(..)? I need the results to reflect recent changes > to the WFS.
I can see in the wfs data store factory a map that is there to cache the store resutls... imho that is a bad practice, still... the store is in unsupported so good thing it works some to start with. I think you can work around the issue by dodging the data store finder (which caches the factories) and creating a new wfs data store factory every time Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Storage Efficiency Calculator This modeling tool is based on patent-pending intellectual property that has been used successfully in hundreds of IBM storage optimization engage- ments, worldwide. Store less, Store more with what you own, Move data to the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
