Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to store the session - Part II

 
Arvind Patel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am little confused on where to store the session and how much information to keep in web tier session and how much to keep in ejb tier.

Here is what I am thinking.

Store user related information (login info, profile, earned mileages, etc..) into web tier. Store Shopping cart related info (Shopping Cart, Itinerary, flights seleted, seats selected, passanger info etc...) into the EJB tier.

I am planning to use statful session bean for Shopping Cart.

Anyone has any suggestions in this architecture ?
 
Francis Amanfo
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi arvind,

The best place to store session is in a Cage with good locks! Then you can be sure it won't escape.
Sorry, trying to be funny but not mean. Please get yourself a copy of one of the excellent texts on J2EE design patterns book. You would definately find a sound solution there.

Regards and good luck.

F
[ January 06, 2006: Message edited by: Francis Amanfo ]
 
Giju George
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arvind,
That's a design choice that you will have to make, as an architect !!!. Whatever you choose, try to justify and document it.
 
bdeb
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a shopping cart like scenario. So my understanding is that we need to use a SFSB here.
 
Arvind Patel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for your responses.

I am going to provide all the requests go through my SFSB (shopping cart).
This includes payment opertions too.

Of course there are other SLSB to support these payment/account etc...

Any feedback on this ?

Thanks,
Arvind.
 
Parag Bharambe
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think stateful bean is not a wise choice for all the scenario. Stateful bean consume lot of resources of server. As number of concurrent uses increases, it will necessities more resources (memory/CPU) on server side.

It is better to think in term of stateless bean, which are lightweight, reusable objects that require less resources. In order to maintain session, you can store the key information in DTO(Data transfer object), which will go back and forth for request which need session. This will obviate the need for session management.

Any other thought??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic