I understand what stateful and stateless session beans are and when to use them but I am curious as to how an application/web server knows that this object instance belongs to this client. Is a session id sent in the form of a cookie and the application/web server knows that this session object belongs to this particular client?
Asked
Active
Viewed 90 times
0
-
1*"I understand what stateful and stateless session beans are and when to use them"* Sorry, this question alone is already evidence you clearly don't. The abovelinked duplicate explains the lifecycle of those beans and the duplicate here explains that of the HTTP session (which has **completely nothing** to do with the word "session" in "session beans"): http://stackoverflow.com/q/3106452 – BalusC Jan 26 '17 at 13:39
-
So what brought up this conversation is that I had a discussion with a colleague. My colleague suggests that every web application is stateless. I said i disagree with the statement, http is stateless but web applications can have state. For example a shopping cart, a shopping cart is maintained throughout each request. After this I said I wasn't a hundred percent sure how the server maintained state but other than a sessionId in the cookie. Either way my colleague still disagrees with me and just ended the conversation with, traditional web apps don't have state..... – Grim Jan 26 '17 at 20:29
-
I could find the definite answer, so I asked the question....thank you @BalusC – Grim Jan 26 '17 at 20:30
1 Answers
-1
From Wikipedia:
The client usually stores and sends the token as an HTTP cookie and/or sends it as a parameter in GET or POST queries

Sergio Lema
- 1,491
- 1
- 14
- 25