Hi, mailing list,
there is problem with org.geoserver.rest.BeanResourceFinder.
Restlet resources are not designed to be thread-safe (response, request are
stored in fields... ), but BeanResourceFinder method findTarget:
*public Resource findTarget(Request request, Response response){
Resource res = (Resource)
applicationContext.getBean(getBeanToFind());
res.init(getContext(), request, response);
return res;
}*
returns the same Resource instance to concurrent threads, well, Spring
returns the same instance,
workaround is to tell Spring to give different instances, that can be done
with scope="prototype" like:
*<bean id="xResource" class="x.xResource" scope="prototype"/>*
But it would be nice if it could be fixed in code not in the Spring
configuration file, because users may forget to add scope attribute, which
may lead to real time errors.
Thank you,
Mārtiņš Linde
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel