• 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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet is a multi threaded object.
Each request is handled within it's own thread.
As long as you instanciate your bean from within one of the service methods there will be no concurrency issues.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which all has little to nothing to do with MVC.
[ June 07, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic