So given the fact that my beans are not prototype, there is a chance that
the same action class may be used for two consecutive requests.

Regards,


On 29/11/12 9:02 PM, "Umesh Awasthi" <umeshawas...@gmail.com> 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 <ro...@in-rev.com> wrote:
>
>>  Hi,
>>    We are using Struts2-Spring integration and all my action classes
>> implement SessionAware, sample code to action class and their spring
>> definition is given below,
>>  public class IRXxxxAction extends ActionSupport implements
>>SessionAware {
>> private Map session; public String execute() {//} public void
>> setSession(Map&lt;String, Object&gt; session) { this.session = session;
>>} }
>>  Spring Configuration
>>  &lt;bean name="userAction" class="com.IRXxxxAction" &gt; &lt;property
>> name="adminDAO" ref="adminDAO" /&gt; &lt;/bean&gt; If I understand
>> correctly, each auto-wired property will be a singleton, so if the
>>above is
>> true, is there anyway that the session map get shared between two
>> simultaneous requests?
>>  Regards,
>>
>>
>>
>>
>>
>>
>
>
>-- 
>With Regards
>Umesh Awasthi
>http://www.travellingrants.com/




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

Reply via email to