Correct: if an action isn't instantiated per-request, obviously
instance variables will be shared across requests.

Dave

On Thu, Nov 29, 2012 at 10:51 AM, rohit <ro...@in-rev.com> wrote:
> So in the current case there is a chance that same action class may be used 
> in simultaneous request and hence the mixup?
>
>
>
> ---- On Thu, 29 Nov 2012 21:02:23 +0530 Umesh Awasthi 
> &lt;umeshawas...@gmail.com&gt; wrote ----
>
>
> First and foremost for using spring with Struts2 make your action bean
> scope prototype
> and is not be ready for the weird issues
>
> Struts2 itself create a new request instance as well other objects
> associated with itself to make it thread safe.
>
>
>
> On Thu, Nov 29, 2012 at 8:59 PM, rohit &lt;ro...@in-rev.com&gt; wrote:
>
> &gt; Hi,
> &gt; We are using Struts2-Spring integration and all my action classes
> &gt; implement SessionAware, sample code to action class and their spring
> &gt; definition is given below,
> &gt; public class IRXxxxAction extends ActionSupport implements SessionAware {
> &gt; private Map session; public String execute() {//} public void
> &gt; setSession(Map&amp;lt;String, Object&amp;gt; session) { this.session = 
> session; } }
> &gt; Spring Configuration
> &gt; &amp;lt;bean name="userAction" class="com.IRXxxxAction" &amp;gt; 
> &amp;lt;property
> &gt; name="adminDAO" ref="adminDAO" /&amp;gt; &amp;lt;/bean&amp;gt; If I 
> understand
> &gt; correctly, each auto-wired property will be a singleton, so if the above 
> is
> &gt; true, is there anyway that the session map get shared between two
> &gt; simultaneous requests?
> &gt; Regards,
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
>
>
> --
> With Regards
> Umesh Awasthi
> http://www.travellingrants.com/
>
>



-- 
e: davelnew...@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton
b: Bucky Bits
g: davelnewton
so: Dave Newton

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

Reply via email to