struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumit Agarwal <2005.su...@gmail.com>
Subject Re: Struts 2 instance creation in memorey
Date Mon, 16 Mar 2009 12:26:35 GMT

Well i have one doubt regarding interceptor and value stack:-

i have read interceptor can store and read the data from value stack.well if
interceptor is defined in the stack.as per below answer one stack will be
create for interceptor and  two instance(for two request) for value stack
then in this case which value stack instance will be refer by the
interceptor?
looking forward to hear from all of you guys.

Thanks in advance.



newton.dave wrote:
> 
> Sumit Agarwal wrote:
>> we are given 2 request for this application from different system
>  > at a time.As per Struts2 two Action instance will be created right?
> 
> Correct: unlike servlets or Struts 1 actions, Struts 2 actions are 
> created per-request.
> 
>> I wanna know how many value stack instance will get create in memory?
> 
> Two, one for each action, otherwise it'd defeat the purpose of having 
> separate action instances.
> 
>> How many Action context instance will get create in memory?
> 
> Action contexts are thread-local variables, and there's one per... 
> action context.
> 
>> how many interceptor instance will get create?
> 
> Depends, but in general there will be one interceptor stack for a Struts 
> 2 package, and it's created at startup, not per-request.
> 
> If an action has configured its own interceptors then there can be 
> multiple interceptor stacks, but they're still not created per-request 
> (and interceptors are not inherently thread-safe).
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2-instance-creation-in-memorey-tp22388082p22537006.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message