aspose file tools*
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
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 />----------------------------------
Shiao, Chern-Jer
Greenhorn

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: 950
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


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MVC Pattern doubt