• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in a mock exam q/a.

 
Vaithiya Sundaram
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?
 
samou Mouloud
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
 
Scott Wellard
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
 
Deepak Pant
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic