Seems fine to me. However just to confirm my understanding. When one sets
the USE_GLOBAL_RENDERING_POOL to false
DefaultWebMapService.getRenderingPool() will return null? And this will
cause the renderer to create its own executor which will then inherit from
the current thread?
On Thu, Feb 17, 2011 at 11:19 AM, Andrea Aime
<[email protected]>wrote:
> Hi,
> I've recently found users that have stores using thread locals, either the
> Dispatcher.REQUEST or
> other thread locals set in servlet filters, that are then needed during the
> data access (yeah, I know,
> I know, that breaks proper layering, however these store are applying
> different behaviors depending
> on the service that is used to access them, wms or wfs).
>
> Unfortunately the renderer now is threaded and normally in GS it uses a
> global thread pool,
> meaning that during data access within the renderer one does not get to see
> the thread locals
> anymore. In particular Dispatcher.REQUEST is not accessible anymore.
>
> Solution: disable the global thread pool under request (system variable) so
> that a new small
> thread pool is created from the current thread instead, and make Dispatcher
> an inheritable
> thread local, so that it can be seen from the child threads as well.
>
> Patch attached. Seems innocuous to me, what do you think?
>
> 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
> mob: +39 333 8128928
>
> 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
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel