struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Flores <>
Subject Re: Struts 2 CRUD Question
Date Fri, 10 Oct 2008 13:27:44 GMT
So, from the Spring documentation:

prototype: Scopes a single bean definition to any number of object 

request: Scopes a single bean definition to the lifecycle of a single 
HTTP request; that is each and every HTTP request will have its own 
instance of a bean created off the back of a single bean definition. 
Only valid in the context of a web-aware Spring ApplicationContext.

So, if the ObjectFactory uses Spring to instantiates Action objects, we 
need to have Spring instantiate these as the framework was designed to 
(e.g. one action per request) which to me, this means "request" scope. 
Please correct me if I'm missing something.

Dave Newton wrote:
> --- On Fri, 10/10/08, Alberto Flores <> wrote:
>> Don't you mean scope="request" and not "prototype"?
> No, "prototype" is the correct scope for action beans.
> Dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


View raw message