Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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

Shopping Cart as Stateful Bean

 
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
 
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.
 
Marshal
Posts: 67496
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"R GSN", please check your private messages for an important administrative matter.
 
author and cow tipper
Posts: 5000
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???
 
A magnificient life is loaded with tough challenges. En garde 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