Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

process messages concurrently?

 
sonali rao
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pg 444 of HF EJB book says that in case of MDB "Multiple beans of the same type can process messages concurrently."
Is this possible in the case of Stateless Session beans and Entity beans?
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that the HFE statement isn't saying that 1 particular MDB instance processes messages concurrently. It is saying that the container can use multiple instances of the same type to process multiple messages. Any 1 instance is only handling one message at a time.
Same thing is true for the other bean types. Bean instance use is thread-safe. The container can use however many instances it wants (or has been configured to use), but each instance is only serving one request at a time.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!