• Post Reply Bookmark Topic Watch Topic
  • New Topic

How Container decide in case of statefull session Bean ??

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Actually we know that in case of statefull session bean contatiner passivate the bean's conversational state by using Least Recently Used algorithm if client is ideal or disconnected from the network.And when same client's request has come again then container reads the passivated state back into the memory and assign to any bean intance(it may not be the original bean instance) available in pool.

Now my question is when same client's request has come again then how container decide that which passivated conversational state has to be activated ?

Thanks & Regards
Bikash
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is actually a pretty common question around the use of SFSBs. The client needs to keep a Handle to the SFSB.
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I understand that it will call getEJBObject method and will get the refernce of the associated EJBObject ...but on what will it fire this method ?

Bikash
 
Dan Johnsson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Mathews:
This is actually a pretty common question around the use of SFSBs. The client needs to keep a Handle to the SFSB.


There is no need to keep a Hanlde to call the same session. The passivisation is completely transparent to the client. The posting referred to what the *container* has to do.

For the client to keep track of "its" instance, it keeps on using the same remote reference it got from the 'create'-call.

For the container to be able to reactivate the right instance, it has to keep a table over the session ids (which conceptually reside in the client/EJBObject) and where the corresponding instance reside at the moment (memory or disk). How this table is implemented is completely specific to the product/vendor.
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What I understood that container maintain a seesion ids corresponding to EJBObject and depend on that session id container activate right conversational state. Am I right ?

Thanks & Regards
Bikash
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!