• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ashish,
Thank you very much! I found it very helpful!
Thanks again!
Seid
reply
    Bookmark Topic Watch Topic
  • New Topic