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?
posted 12 years ago
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
SCJP 1.4, SCWCD<p>Ours is a world where people don't know what they want and are willing to go through hell to get it.<br /> - Don Marquis
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads