• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

doubt in a mock exam q/a.

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
104. 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 BMT to manage the transactions.

B Have an Entity Bean to represent the customer. Use a Stateful Session Bean to manage the users session and use BMT to manage the transactions.

C Have an Entity Bean to represent the customer. Use a Servlet to manage the users session and use CMT to manage the transactions.

D 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.

Choice C is correct.


I thought choice D would be the answer.
Can you explain how choice C is the right answer here?
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Sun (J2EE blueprints), it's a good practice to manage session state in a stateful session bean
For IBM: avoid stateful session bean, instead, use HttpSession with a relational database
Your choice ???
Mouloud
 
samou Mouloud
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wooosh !
Sorry, sorry !
Read careffully the questions....You can't manage the session state in a servlet !!! ( sure, you have read HttpSession)
Mouloud
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vaithiyanathan,

My only guess as to why 'C' was chosen is that the question mentions 'a huge volume of traffic'. Its generally perceived that stateful session beans don't scale that well so they may not be the best choice when the number of users is very large.
Servlets can be a reasonable choice if the session information is mainly needed by the web and not the business tier.

I would still be inclined to choose 'D' myself, but the word 'huge' is kind of trying to drag you toward the servlet answer I think
 
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vaithiyanathan,

I would agree with Scott.

Two things that stand out here are: Huge Traffic and Rough Design.

- CMT is default.
- HTTPSession is lightweight option with session replication in cluster. SFSB are heavy objects and also they do not survive server crashes.

But it is very confusing to pick between C and D

regards,
Deepak
 
Looky! I'm being abducted by space aliens! Me and this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic