struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bradley Hill <>
Subject Re: why only one instance of Action class (Action class thread safety)
Date Mon, 05 May 2003 16:59:26 GMT

Indeed, the multi-threaded use of Actions is much like the Servlet API, but most 
Struts users (not developers) at this point are probably more familiar with the 
JSP APIs than with working directly with "pure" Servlet apps.  

Why not use the lifecycle model of a JSP tag for Actions?  Pool them for 
performance (if it's even worth the trouble), include a reset/cleanup method to 
be called by the framework, and guarantee single-threaded access within the 
scope of a request.  

It would be an equally familiar and easy to explain by analogy model for most 
users and avoid the issues surrounding thread safety which, if in practice are 
not actually so complicated, many find intimidating and unintuitive.

Brad Hill

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message