• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shopping Cart as Stateful Bean

 
Rama Ghanta
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
If I implement the Shopping Cart as a Stateful Session Bean then every time the customer requests the details of the cart do I need to send all the information in the cart from business tier to web tier? Does HTTPSession scale better than the SFSB? My architecture doesn't need thick clients.

The SL-425 manual(Architecting J2EE Applications) suggests always use SFSB for maintaing client side session and for high scalability.

Thank you
Rama Zha
 
Galaxy galaxy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Rama,
If this is regarding your Big Smokes solution, please let me know.

I think stateful session bean is good solution. Go ahead!!

I am also implementing in similar fashion.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"R GSN", please check your private messages for an important administrative matter.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For web based clients, I would always put the important state in either a database, or the HttpSession, or both, actually.

The SFSB is useful if you have fat clients that do not have access to the HttpSession. I think using a SLSB for the sake of using a SLSB is overarchitecting a solution, and that's a bad thing.

I'd be loath to do it, and if I actually saw that on an architecture plan for a project I was doing, I'd laugh myself silly. But, is it what Sun wants to see on your solution? That might be a better question to ask yourself.

I wouldn't do it.

-Cameron McKenzie
 
Galaxy galaxy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
McKenzie,

I agree with you. HttpSession having the session info and using a stateless bean would theoretically have better scalability, but as the container's capability to passivate and then reload the state thru activate is becoming more competent, I think SFSB may be a better solution. Ofcourse, the need to passivate and activate may seem to be overhead here, but we need to look at the memory requirements also.

If our app is doing good in the given(tuned) JVM params, it isokay, if not, we keep the HttpSession light... Is this a right argument???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic