• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cade Part 2 Example - How is Session Maintained?

 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

While once again reviewing Cade's SCEA Study Guide in the case study at the back of the book I'm wondering how a user's session state is maintained. It appears that a user's session is not actually maintained. Using Value Objects the required data is merely passed back and forth between the presentation and business tiers.

Am I missing something?
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one has been able to figure this out?
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
Cade mentions on page 168 (Tier Map) that session is maintained in the Presentation tier. On page 172 (Catalog Component Diagram) a ShoppingCartForm JSP has a dependency on the CatalogController Servlet. This implies that the servlet CatalogController is storing session state for the shopping cart.
If you look at the sequence diagram (Browse Catalog) on page 174, you see that CatalogController is adding products into the ShoppingCart.

Perhaps there could have been a noteadded to the component diagram explaining things (i.e. servlet is storing state for the shopping cart).

Peter hope this helps.

Ray
 
Luciano Queiroz
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, Ramon, but you cannot use a HttpSession to store user state for the Travel Agents running swing App.
I have choosed SFSB as a way to store state for both web and app clients.
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ray / Luciano:

Thanks for the thoughtful replies.

Ray - you are right. I missed that part in the Tier's explanation.

Obviously in our assignment the controller must be on the business tier. But can't the java app merely maintain state too and make it a plausible solution to session state?

Thanks again!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic