Thanks for your reply, Jody and Andrea! In fact, after reviewing my
requirements I realized that most layers of the two maps have different
data stores/sources. So, I would have to create two different layers for
each map anyway. I was a bit quick in posting to the list..

So, the current implementation works fine for me. It just came as a
surprise to me that MapContent.dispose() makes the layers unusable.


On Tue, Jul 8, 2014 at 9:45 PM, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> On Tue, Jul 8, 2014 at 8:13 PM, Jody Garnett <jody.garn...@gmail.com>
> wrote:
>
>> We can also talk to Andrea to check if several MapRenderers can use the
>> same Map (and thus Layers) concurrently, for example during "tile"
>> rendering. If the renderer is grabbing a copy of all the
>> configuration/styling then this may work out ...  If so we could introduce
>> a MapContent.dispose(true) - to allow control of disposing all the layers.
>> The other alternative would be to reference count the layers so
>> MapContent.dispose() can figure out if is the "last" map using a layer and
>> thus in position to clean up any resources used.
>>
>
> It may work, but I would not count on it, StreamingRenderer is not
> designed to be thread safe
>
> Cheers
> Andrea
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/NWWaa2 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
>
> -------------------------------------------------------
>
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to