| Author |
MVC pattern doubt
|
Suresh Yadla
Greenhorn
Joined: Mar 26, 2005
Posts: 12
|
|
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
|
Suresh Yadla<br />SCJP, SCWCD, SCBCD<br /> <br />----------------------------------
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
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.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
Which all has little to nothing to do with MVC. [ June 07, 2005: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: MVC pattern doubt
|
|
|