In
Java BluePrint PetStore Application shopping cart was implemented as SFSB.
"The shopping cart module implementation is a straightforward stateful session bean,
which maintains a collection of CartItem objects in a private HashMap.
EJB-tier components may access the shopping cart module directly. The Web
tier maintains a reference to the EJB-tier controller in an HttpSession attribute.
The EJB-tier controller’s method getShoppingClientFacade returns a reference to
a ShoppingClientFacadeLocal interface. The shopping client facade’s
getShoppingCart method returns the current session’s shopping cart."
And I'm going to implement my shopping cart in the same way.
But! I wonder if this decision can be applied in
clustered environment
I mean situation when there are two or more hosts with installed web server and application server on each and load balancer.
Please help guys! It's very important for my
SCEA assignment.