Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The HTTP session is used to identify the client.
The Web part (servlet, jax-rs, etc) has all sorts of resources that can be injected through annotations (in the case of jax-rs, for example) or pulled directly from request (in the case of servlets). One of them is HttpSession. The session id is stored there, by which the client can be identified. The EJB layer has its own SessionContext, which is not directly associated with the HttpSession (but uses it to determine the calling client). This SessionContext is already distributed to the entire application, and (sort of) it is where the states of stateful beans are stored.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question