• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Manage session state in Servlet in huge volume traffic site???

 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Friends,
I do not understand why correct answer states that session state can be managed by servlet if the site expects “huge volume of traffic” ??? I would say that Stateful Session Bean is a better choice for managing state in such a busy site! What do you think about this?
Thank you very much!
Seid
Q: You are developing an online shopping store for an art gallery. The company aims to bring fine art to the masses and expects a huge volume of traffic through the site. The site allows customers to pay for goods and arrange delivery methods using credit cards. You have read through the requirements and have a rough design in your head. Which of the following is the most appropriate rough design for this site?
A: Have an Entity Bean to represent the customer. Use a Servlet to manage the users session and use CMT to manage the transactions.
 
Lipman Li
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
manage session state in servlet(http session) is valid choice, is there any alternative?
 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There were two choices:
1. Servlet
2. Stateful Session Bean
Doesn't Stateful Session Bean qualify better for the above description?
Please share your opinion!
Thanks,
Seid
 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Have an Entity Bean to represent the customer. Use a Stateful Session Bean to manage the users session and use CMT to manage the transactions.
2. Have an Entity Bean to represent the customer. Use a Servlet to manage the users session and use CMT to manage the transactions.
 
Mannu Sureka
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Seid,
The disadvantage of maintaining a session state using HttpSession in a servlet is that its limited to only HTTP clients.
Suppose there is a requirement that there should be a java swing application as a client as well as a web based client then you need to maintain the session state in a stateful session bean.
Here is a link on the J2EE blueprints that discusses about the Tradeoffs of managing session state using servlets or stateful session beans .
Ashish.
 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ashish,
Thank you very much! I found it very helpful!
Thanks again!
Seid
 
Seid Myadiyev
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ashish,
Thank you very much! I found it very helpful!
Thanks again!
Seid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic