• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session state management

 
Ashish Sarin
author
Ranch Hand
Posts: 444
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There have been discussions around "when" to create SFSB as the shopping cart. I think some of the approach suggested was to create the shopping cart after the seat selection is done by the customer. But I am not sure if this should be the approach because pricing flights, re-selection (followed by confirmation) of flights and and seat selection would require re-creating the state at the business tier. I feel that some level of state management is required (to lower the complexity of state re-creation on the EJB-tier for every request) either in the HttpSession if the shopping cart SFSB is to be created later.

Other approach which makes sense to me is to create the shopping cart just after the user selects the flights from the search results shown.

Any thoughts on these approaches will be helpful.

thanks
Ashish
 
Tanveer Ahmad
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ashish,
The basic idea of shopping cart is to let the user add items in it and at the end pay for all the selected items. Here in this case the user can keep on adding "order line items" to the "order" and finally he/she can pay for it once done.
So ideally the moment the user decides to prepare an order, there should be an shopping cart ready for him/her.

Now its up to the designer to decide where he wants to maintain this shopping cart. in ejb (SFSB) or in the HTTPSession bean.

If you ask me, I would say go for HTTPSession.

thanks
Tanveer
 
Ashish Sarin
author
Ranch Hand
Posts: 444
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply.

I feel that using HttpSession may be a good idea from performance perspective but will not be considered a best practice because Blueprint suggest using SFSB for maintaining conversational state. Also, when planning for load balancing and clustering, the idea is to keep your HttpSession lightweight.

Any thoughts ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic