• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session state management

 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic