> The answer is "false". EJBs are not aware of "sessions" in the sense
> that the term is used in the Servlet API. The term is not used in
You are right, they are not HttpSessions but they are sessions
nonetheless. If you consider a Stateful session bean then it operates
within the context of a session with a particular client. So, in this
case the answer is true. This is why I thought it was a ambiguous
question that could be interpreted in various ways.
John C. Bollinger - 08 Apr 2004 00:00 GMT
>>The answer is "false". EJBs are not aware of "sessions" in the sense
>>that the term is used in the Servlet API. The term is not used in
> You are right, they are not HttpSessions but they are sessions
> nonetheless. If you consider a Stateful session bean then it operates
> within the context of a session with a particular client. So, in this
> case the answer is true. This is why I thought it was a ambiguous
> question that could be interpreted in various ways.
Even if you apply the interpretation that using a session bean
constitutes establishing and using a session with the EJB container, the
client does not "require" an existing session of any kind to establish
the EJB session. A session object is certainly not operating within the
context of some external session -- at best it represents a session
itself. In truth though, some of the ways that multiple session and
entity objects can be used together do not fit very well into the mold
of what we usually mean by a "session". All this probably has something
to do with why the EJB specs do not describe session objects or beans in
terms of sessions (ironically enough). Session beans' name doesn't suit
them very well.
John Bollinger
jobollin@indiana.edu