Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Java Enterprise & Remote Computing
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Nov 23, 2011 1:18 PM by
Dukes Book example Cart synchronized
Nov 23, 2011 8:32 AM
Going through the Dukes Bookstore examples.
Why are the shopping cart methods synchronized?
If each user only has one session. Then then only access one servlet at a time.
So there is no need to synchronized access to the cart.
That's my thinking, am I wrong, explain it please?
This content has been marked as final.
Show 1 reply
Re: Dukes Book example Cart synchronized
Nov 23, 2011 1:18 PM
in response to
If the user clicks fast enough, or the request processing is slow enough, it's possible to have two requests from the same user being processed at the same time. Hence the need to consider thread safety.