Hello all, may i know the difference between the sessions in ejb and in JSP/Servlets. Are they used for same purpose ? If not under what circumstanes do we go for them. Thanking in advance with regards kanth
A "session ejb" is NOT a session in the sense of being a centralized place for short-term data persistency the way a servlet/JSP session is. In fact, the Stateless Session EJB has no data persistency at all, while Entity EJBs are permanently persistent. In other words, as far as user sessions are concerned, Sun would have been better off naming them "gummi-bear EJBs". I think their intent had actually been to mean "EJBs used BY a Session" (?)
An IDE is no substitute for an Intelligent Developer.
Joined: Jul 18, 2001
Hi Tim, I get only this point The Stateless Session EJB has no data persistency at all, while Entity EJBs are permanently persistent. but not much regarding all the other points. I have a vague idea about sessions w.r.t EJB's and the web components,but i am not able to get to the exact difference between them. Can you explain this point a little more Tim? thanks Manjunath
My understanding is that in Servlet/JSP you can put data in the session object to persist the info for a session. However, in EJB, if you use a stateless session bean you will not persist info when you jump between methods/pages within a log-in session. Please comment more.
"ranga 786", Thank you for your input on this subject. Also, the Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.