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.
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.
posted 12 years ago
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