This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTPSession vs Stateful Session Bean

 
Bharat Talwar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I use HTTP Session or Stateful Session bean to maintain session information for the Part II assignment?
 
sankha subhra das
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharat,
please read my earlier thread on this issue. Lemme know if it helps.
http://www.coderanch.com/t/152841/java-Architect-SCEA/certification/Hardware-inputs-architects

Thanks
Sankha Subhra Das
 
Bharat Talwar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Thanks for the reply. But my question has more to do with the performance as per the documents. Its says need bettr performance for travel agent application. If I use HTTP session (servlet) for both Web client and travel agent swing application, then how does the peformance differ? On the other hand, if I use SFSB for storing session then both can use it. Plus, Swing can call EJB directly thus reducing network traffic and improving performance. Pls advice?
 
sankha subhra das
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharat,
precisely thats where u need to wear ur "architectural" cap and make a judicious choice. Yes travel agents will be the core of the business, hence the system should be fast/available to agents at all times.
You mentioned,
"If I use HTTP session (servlet) for both Web client and travel agent swing application, then how does the peformance differ?"
Take note first that http session can be used with web components only and NOT swing components. Now for the typical customer, you have a choice of using httpsession or SSB.There's plenty of articles on the internet discussing/comparing the two. As an architect, u need to think if httpsession will suffice for the amount of data to be stored in session. Also remember httpsession works best for storing small amounts of data like user navigation, preferences etc. I have used httpsession for my customer interface and provided justification for the same.
yes ur right when ur say that the use of SFSB will suffice both the actors' needs. Do u see any other choice than using swing components to talk to EJB's directly ? u might have ur own session management handling (like sending data back and forth between requests) or store it as a cache in agent's system. now u hafta figure out the performance impact between client side caching vis-a-vis server side caching thru SFSB's. again u hafta get back and see if the hardware provided will allow u this at the client without the need for extra caching servers. as a general rule, performance wise its faster for swing components to access business tier directly and web clients to use httpsession over SFSB's for most business processes.
As I said before, there is nothing wrong or right as far as architecture is concerned, it all depends on what assumptions u make and how best u fulfil the requirements given the hardware constraints.

Thanks
Sankha Subhra Das
 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add.
I have read somewhere sometime back that SFSBs are not good in clustering environment .
 
Bharat Talwar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sankha. It was helpful. I wanted to discuss some design choices in my current work area. Thought of discussing it with you if you interested. Kindly e-mail me at talwarbharat@yahoo.com, and i can take it offline.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic