On 01-02-2010 at 09:41, jeffrey.d.k...@wellsfargo.com wrote:
> Sorry if this is covered elsewhere, I tried searching around without much
> luck so...
> 
> Since Stripes ActionBeans have getters/setters for the request params, and
> if we want to get at the resulting DAO object in the ForwardResolution JSP,
> we also need getter/setter for that object in the Action as well, then
> there cannot be thread safety it seems, under load.

ActionBean instances are not threadsafe. You've already identified the cause:
the request parameters are bound to the ActionBean instances. The result is
that each ActionBean instane is tied to the request it handles.

Currently, Stripes instantiates an ActionBean for each request. Note that it is
possible to pool ActionBean instances; this is just not the current
implementation.


> Using JMeter I get multiple threads(users) calling common Stripes Action
> Beans with different values in the request parameters.  Inspecting the XML
> responses, which are created by the ForwardResolution JSP, it appears that
> the data referenced with EL in the JSP, shows that the data belongs to
> another thread and not the one that issued the request I am inspecting.
[...]
> I'm expecting I'm missing something obvious, but would like a little help
> finding what that is.

One of the mistakes I used to make is that I didn't log enough information to
uniquely identify the context where my code was running. In your case, I'd
ensure that each bit of information you collect is associated with the HTTP
request and thread handling that request. It may provide more information
than you have now.


Oscar

-- 
   ,-_
  /() ) Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  Even if you win the rat race, you are still a rat...

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to