Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC Pattern doubt

 
Suresh Yadla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have an website with MVC pattern, and I have the servlet, JSP, and Bean.

In this scenario, if two users log in at the same time and the some state is store in bean then wouldn't there be a conflict or will each user have its own bean where some state/data could be kept for a while.

If there is a conflict then why should we use MVC pattern.

Suresh
 
Shiao Bing
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is the attributes in request scope are thread safe.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

MVC pattern don't point that you use only single bean to store your state. There may be more that one bean instance created to store the state if required. The exact requirement depends on your application.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic