• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How Container decide in case of statefull session Bean ??

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic