• Post Reply Bookmark Topic Watch Topic
  • New Topic

no of beans in container  RSS feed

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got a doubt while discussing abt the stateful session bean.I understood the activation & passivation mechanism, but unfortunately if container is maintaining only 10 beans(in case the number cannot be increased) in the cache & all the beans are "in use" and a 11th client asks 4 a bean wat do u assume the container will do?
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sitaram,

Admitting that we don�t play other container specific trickeries (like allow-concurrent-calls SFSB specific tag with weblogic) I could see two options:
  • The container blocks the current transaction, and try to passivate (using either LRU or NRU) in order to release the cache. If the cache could not be released before transaction times out, an exception will be thrown.
  • Throws kind of cache full exception right away.


  • Can you think of other options?
    First doesn�t make much sense, because the blocked transaction could hold valuable resources. If this happens for many simultaneous transactions it could have pretty bad consequences. Hence I�ll go with the second option. Of course this is just my opinion (which I never tested, since in practice I never used SFSBs that often).
    Regards.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!