File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes MVC Pattern doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "MVC Pattern doubt" Watch "MVC Pattern doubt" New topic

MVC Pattern doubt

Suresh Yadla

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 Yadla<br />SCJP, SCWCD, SCBCD<br /> <br />----------------------------------
Shiao Bing

Joined: Aug 18, 2001
Posts: 7
My understanding is the attributes in request scope are thread safe.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 951

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.


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
I agree. Here's the link:
subject: MVC Pattern doubt
It's not a secret anymore!