• Post Reply Bookmark Topic Watch Topic
  • New Topic

How Session & entity beans will react to too many client request?

 
Amee Dabo
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If too many clients are requesting a table record & trying to update it..how Session beans(Stateful & stateless) & entity beans will react?
Thanks in advance,
Ameeta
 
nan sh
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody has to wait, just like two or more people want to write something on the same paper! It is nothing to do with System's cability. But you have to make sure the trascation block won't include users' interaction.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Some informations:
Session beans do not support concurrent access.
EJB by default prohibits concurrent access to bean instances, if for example one of the clients invokes a method on the EJB Object, no other client can access that bean instance until the method invocation is complete, if the method is part of a larger transaction the bean instance cannot be accessec at all, except within the same transactional context, until the entire transaction is complete.
regards.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A separate stateless session bean will be provided for each user request. When the request is complete, the session bean will be returned to the pool and can be used by anyone else. How many stateless session beans are in the pool is dependent on deployment options.
A stateful session bean is created for each user. There is no sharing of stateful session beans since each one is unique to each user (this isn't exactly the case since the state of the bean could be serialized and the bean reset and used for someone else).
Entity beans are unique for each primary key. If more than one request comes in to update the same entity bean then each waits until the prior request is committed. (This is dependent on deployment options.)
 
Amee Dabo
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much everybody..
-Ameeta
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!