I believe you should look more in to more spring doc to see how spring provide instance based on the scope provided for the bean.
Struts2-Spring integration is only providing bridge where in place of struts internal DI, Spring is handling DI for you but rest of the flow and concepts will be same Thanks Umesh On Fri, Nov 30, 2012 at 12:25 PM, Chris Pratt <thechrispr...@gmail.com>wrote: > It's not a chance, the same instance is being used for all requests to that > action. > (*Chris*) > > > On Thu, Nov 29, 2012 at 7:42 AM, Rohit Gupta <ro...@simplify360.com> > wrote: > > > 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<String, Object> session) { this.session = > session; > > >>} } > > >> Spring Configuration > > >> <bean name="userAction" class="com.IRXxxxAction" > <property > > >> name="adminDAO" ref="adminDAO" /> </bean> 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 > > > > > -- With Regards Umesh Awasthi http://www.travellingrants.com/