Hi,
while working on a fix for http://jira.codehaus.org/browse/GEOS-4760
I've noticed that not all changes I was making to the UI were reflected
in the layer behavior.
After looking a bit into it I've noticed this is happening because
GeoServerTileLayer keeps a hard reference to LayerInfo and LayerGroupInfo,
which is a big no no: you only get an old snapshot of it, and the first
time you access some field, the ModificationProxy around it will cache it
and keep on returning that particular value.
Which of course, does not really work well if people are changing, say,
caching headers configs.
I'd like to avoid the overhead of a full lookup by name every time, so I
guess the quickest thing to do is to cache in GeoServerTileLayer the unique
id of the layer or layer group, and access catalog with it when LayerInfo
or LayerGroupInfo are needed.
I've checked the contents of DefaultCatalogFacade... that still makes it go
though a full scan...
A possible alternative is to have each GeoServerTileLayer be a listener
onto catalog changes, however in a system with many layers that would make
for an awful lot of similar listeners, each interested to their own
particular layer.
Do you know if there is way to build just a single centralized listeners,
that then locates the corresponding GeoServerTileLayer and updates its
cached LayerInfo/LayerGroupInfo?
Cheers
Andrea
--
==
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.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
-------------------------------------------------------
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel