Please try to address the all points, I will be very helpful for me.if you found anything is wrong ,then guide me in proper way.
I am very confused about the idea of session, reason for this is I read many article so please do not ask me to refer any books or article.
Actually what are the use of session in any web application or distributed application.
1) How the data of a user is saved from other user�s interaction, to preserve the data from other users, It should be saved into session object?
2) stateless session and statefull session beans use session object to preserve data of a client
3) In any web application or distributed application, if data needed until the client quit from the application then where the data will be saved?, whether it is in session object?
4) As per my understanding only data are unique to a client over others. I explain it as follow
For example, in a interest calculator if client enter the amount and period then it will output the interest rate, when many users access the application and enters different data then output will vary for each users.
so data of each users should be saved. Please suggest how it is implemented in application
In stateless session bean ,what the "session" refers?.
Stateless bean does not maintain a conversational state for a particular client,then why it bear "session" in it.Why I can't say this as "Stateless bean" ?.
1) Yes, it is saved in the session object. 2) No. Stateless session beans don't save any user state. Stateful session beans do store state, but not in the user session. At least not directly. 3) Yes. The session is a good spot for data like that. 4) Yes. You would want to put each user's data into their own session to avoid the scenario you described.
> In stateless session bean ,what the "session" refers?. Nothing. A stateless session bean does not have a session. I don't know what the word "session" refers to there. It's an interesting question.
In stateless session bean, what the "session" refers?.
There are two types of Session Enterprise JavaBean. One maintains "state" and the other does not maintain "state".
A user sits at a desk and uses a software application for 10 minutes. The user had a "session" with the application. During his/her session with the application, he/she executed some type of business logic in the application. The application's developer wrote the code that contains the logic in a "Session" EJB.
There are other types of Enterprise JavaBeans. There are "Entity" Enterprise JavaBeans and there are "Message-Driven" Enterprise JavaBeans. These other types of EJB are for different things other that handling business logic and user "sessions" with the application.
The word "Session" is an adjective that describes a certain type of Enterprise JavaBean. This helps distinguish it from the other types, e.g. Entity, Message-Driven.