• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB it's thread safe, its not ?  RSS feed

 
Paulo Asterio Nunes
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Only to clarify me, each SessionBean is tied to a client right ?, it's mean that SessionBeans are thread safe ?


Anyone can pick up more this issue ?


cheers ,,

Paulo Nunes
Brazil
 
alzamabar
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paulo Nunes:
Hi ,

Only to clarify me, each SessionBean is tied to a client right ?, it's mean that SessionBeans are thread safe ?


Anyone can pick up more this issue ?


cheers ,,

Paulo Nunes
Brazil


Yes Paulo, session beans are thread-safe. But pay attention when you talk about being tied to a client. There is a difference between stateless and stateful session beans. The former are 'tied' to a client just for the duration of a method execution, while the latter maintain a conversation state. One is guarantee, however, that a bean instance will serve only one client at the same time.
 
Paulo Asterio Nunes
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marco,

Thanx for your reply ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!