• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to maintain session with heavy load?

 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw some suggesting to maintain session in servlet while someone else suggesting to maintain in stateful session bean. So which is the better choice?
I tend to think stateful session bean is a better choice since to maintain client state is one of its design goals and also it relieves some procession from web container to make its life easier serving heavy load.
How do you guys think?
 
venkatesh rajmendram
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have seen in the best practices putting large data into servlet session is not advisable, it hampers the performance, But at the same time it does not say it is wrong to put in stateful session bean. Well if you have EJB and servlet container on same server it is advisable to use stateful EJB's. that way you can make it as local call and your performance will be good.
On the other hand if your containers are seperate then it depends on how frequently you refer to this data.But still my take is use stateful EJB's. Since it has not been mentioned that it is not advisable unlike servlet session.
- Venkatesh Rajmendram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic