• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about page 104 of Head First EJB

 
Kuo-Feng Sun
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
There is a question on page 104 I cannot understand why it's true.
Here is the question.
There must be one stateless session bean per client, for as long as the client is in the middle of a business method invocation on the bean.
Why cannot clients share the same stateless session bean?
Please help. Thanks!
 
Nick Bauman
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The key phrase you are missing is "in the middle of a business method invocation". It is true that while a StatelessSessionBean is in the middle of servicing a request, it is tied to that client.
 
Chris Lewold
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stateless session beans can NEVER be shared. Only one of them can service a given client at the same time.
 
Kuo-Feng Sun
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, guys.
I've got it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic